PageSourceSearch

https://dune-copasi.netlify.app/assets/js/5cb19bf4.40b20180.js

js dune-copasi.netlify.app collected 2026-10-03 10:42:09 UTC 14,640 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkdune_copasi_docusaurus=self.webpackChunkdune_copasi_docusaurus||[]).push([[6731],{590:(e,i,n)=>{n.r(i),n.d(i,{assets:()=>u,contentTitle:()=>c,default:()=>g,frontMatter:()=>d,metadata:()=>p,toc:()=>h});var o=n(4848),r=n(8453),t=n(2826),s=n(1543),a=n(1302),l=n(2478);n(6540),n(8774);const d={id:"install_docker",title:"Install Docker Container",description:"How to install the Docker Container",sidebar_label:"Install from Docker",tags:["Docker","CLI","API"]},c=void 0,p={id:"install_docker",title:"Install Docker Container",description:"How to install the Docker Container",source:"@site/versioned_docs/version-v2.1.0/install_docker.mdx",sourceDirName:".",slug:"/install_docker",permalink:"/docs/install_docker",draft:!1,unlisted:!1,editUrl:"https://gitlab.dune-project.org/copasi/dune-copasi/-/edit/master/doc/docusaurus/versioned_docs/version-v2.1.0/install_docker.mdx",tags:[{inline:!0,label:"Docker",permalink:"/docs/tags/docker"},{inline:!0,label:"CLI",permalink:"/docs/tags/cli"},{inline:!0,label:"API",permalink:"/docs/tags/api"}],version:"v2.1.0",lastUpdatedBy:"Santiago Ospina De Los R\xedos",lastUpdatedAt:1732665958e3,frontMatter:{id:"install_docker",title:"Install Docker Container",description:"How to install the Docker Container",sidebar_label:"Install from Docker",tags:["Docker","CLI","API"]},sidebar:"docs",previous:{title:"Install from Binaries",permalink:"/docs/install_binary"},next:{title:"Install from Package Manager",permalink:"/docs/install_package"}},u={},h=[{value:"Install Docker",id:"install-docker",level:3},{value:"Get the DuneCopasi Docker image",id:"get-the-dunecopasi-docker-image",level:3},{value:"Prepare a working directory",id:"prepare-a-working-directory",level:3},{value:"Run the program",id:"run-the-program",level:3},{value:"Build local Docker image",id:"build-local-docker-image",level:2}];function m(e){const i={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",mdxAdmonitionTitle:"mdxAdmonitionTitle",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(i.p,{children:["One of the easiest forms to use our executables for ",(0,o.jsx)(i.a,{href:"use_cli",children:"Command Line Interface (CLI) usage"})," is by downloading and running a\n",(0,o.jsx)(i.a,{href:"https://www.docker.com/",children:"Docker Container"}),". This way, the software is boundled in a Docker image\nsuch that no installation other than docker is required."]}),"\n",(0,o.jsx)(i.h3,{id:"install-docker",children:"Install Docker"}),"\n",(0,o.jsxs)(i.p,{children:["First, obtain and install Docker following the official\n",(0,o.jsx)(i.a,{href:"https://docs.docker.com/get-docker/",children:"Docker installation instructions"}),"."]}),"\n",(0,o.jsx)(i.h3,{id:"get-the-dunecopasi-docker-image",children:"Get the DuneCopasi Docker image"}),"\n",(0,o.jsxs)(i.p,{children:["With Docker available in your command line, you can now obtain the DuneCopasi Docker image.\nThis can simply be done by pulling it from the ",(0,o.jsx)(i.a,{href:"https://gitlab.dune-project.org/copasi/dune-copasi/container_registry",children:"Docker registry"}),":"]}),"\n",(0,o.jsx)(i.pre,{children:(0,o.jsx)(i.code,{className:"language-bash",children:"docker pull registry.dune-project.org/copasi/dune-copasi/dune-copasi:v2.1.0\ndocker tag registry.dune-project.org/copasi/dune-copasi/dune-copasi:v2.1.0 dune-copasi\n"})}),"\n",(0,o.jsxs)(i.p,{children:["The first line downloads the image from the internet while second one creates a tagged alias named ",(0,o.jsx)(i.code,{children:"dune-copasi"})," so that it is easier to recall."]}),"\n",(0,o.jsx)(i.admonition,{title:"alias collition",type:"warning",children:(0,o.jsx)(i.p,{children:"If you want to work with different Docker images from DuneCopasi, make sure that your local aliases do not collide!"})}),"\n",(0,o.jsx)(i.p,{children:"Once this is done, your terminal should look something similar to this:"}),"\n",(0,o.jsx)(t.A,{title:"Pulling DuneCopasi Docker image",children:[{input:"docker pull registry.dune-project.org/copasi/dune-copasi/dune-copasi:v2.1.0",output:["v2.1.0: Pulling from copasi/dune-copasi/dune-copasi","09dd50cc7a64: Pull complete","820c3cdfe17d: Pull complete","c91c7d9f3fb1: Pull complete","4928c27b1e25: Pull complete","6fe40e7737d8: Pull complete","7b80474789e1: Pull complete","bd9ddc54bea9: Pull complete","Digest: sha256:56feba94d0acf8f392eb835a9c25fdbd2124a199ea55cee3ff9635a3871fd597","Status: Downloaded newer image for registry.dune-project.org/copasi/dune-copasi/dune-copasi:v2.1.0","registry.dune-project.org/copasi/dune-copasi/dune-copasi:v2.1.0"]},{input:"docker tag registry.dune-project.org/copasi/dune-copasi/dune-copasi:v2.1.0 dune-copasi"},{input:"docker images",output:["REPOSITORY    TAG        IMAGE ID       CREATED        SIZE","dune-copasi   v2.1.0     acb239d6253e   2 seconds ago  337MB","..."]}]}),"\n",(0,o.jsxs)(i.p,{children:["You can check that the image is working properly by running the ",(0,o.jsx)(i.co
1de,{children:"--help"})," command:"]}),"\n",(0,o.jsx)(i.pre,{children:(0,o.jsx)(i.code,{className:"language-bash",children:"docker run dune-copasi --help\n"})}),"\n",(0,o.jsx)(i.p,{children:"An output similar to the following should be emitted:"}),"\n",(0,o.jsx)(s.A,{prefix:"docker run "}),"\n",(0,o.jsx)(i.h3,{id:"prepare-a-working-directory",children:"Prepare a working directory"}),"\n",(0,o.jsxs)(i.p,{children:["To be able to easily share data between your operating system and the Docker\ncontainer, prepare a working directory with read/write rights to ",(0,o.jsx)(i.em,{children:"other users"}),"\n(e.g., a folder named ",(0,o.jsx)(i.code,{children:"workdir"}),"). We will save the simulation files on this working directory:"]}),"\n",(0,o.jsx)(t.A,{prompt:"~/workdir$",title:"Creating a working directory",children:[{input:"mkdir -m o+rw workdir",prompt:"~$"},{input:"cd workdir",prompt:"~$"}]}),"\n",(0,o.jsxs)(i.p,{children:["This working directory will be accessible to your local text editor, Paraview, as\nwell as to the ",(0,o.jsx)(i.code,{children:"dune-copasi"})," executable within the Docker container. Now, you can\nmove or create your configuration files into it at will."]}),"\n",(0,o.jsxs)(i.admonition,{title:"Configuration Options Example",type:"tip",children:[(0,o.jsx)(a.A,{language:"ini",title:"~/workdir/config.ini",showLineNumbers:!0,children:l.A}),(0,o.jsxs)(i.p,{children:["For more information on the possible options to successfully run a simulation, make sure to visit the ",(0,o.jsx)(i.a,{href:"param_tree",children:"Configuration Options"}),", and the ",(0,o.jsx)(i.a,{href:"/tutorials",children:"Tutorials"})," documentations!"]})]}),"\n",(0,o.jsx)(i.h3,{id:"run-the-program",children:"Run the program"}),"\n",(0,o.jsxs)(i.p,{children:["Once you have set up a valid configuration file (e.g. ",(0,o.jsx)(i.code,{children:"config.ini"}),"), you are ready to use the program through the ",(0,o.jsx)(i.a,{href:"use_cli",children:"CLI"})," ",(0,o.jsx)(i.em,{children:"via"})," docker.\nTo do so, create and run a Docker container with the configuration file:"]}),"\n",(0,o.jsx)(i.pre,{children:(0,o.jsx)(i.code,{className:"language-bash",children:"docker run -v $PWD:/dunecopasi dune-copasi --config=config.ini\n"})}),"\n",(0,o.jsxs)(i.p,{children:["This mounts the Docker container working directory ",(0,o.jsx)(i.code,{children:"/dunecopasi"})," in the current directory ",(0,o.jsx)(i.code,{children:"$PWD"})," (e.g. ",(0,o.jsx)(i.code,{children:"~/workdir"}),") and\npasses the rest of the arguments to the ",(0,o.jsx)(i.code,{children:"dune-copasi"})," executable.\nThis is executed by default and is used in same way as with the ",(0,o.jsx)(i.a,{href:"use_cli",children:"CLI"}),".\nIn this manner, the argument passed to the underlying executable is ",(0,o.jsx)(i.code,{children:"--config=config.ini"})," and the results\nof the computations will be written on current directory."]}),"\n",(0,o.jsxs)(i.admonition,{type:"tip",children:[(0,o.jsx)(i.mdxAdmonitionTitle,{children:(0,o.jsx)(i.code,{children:"docker run"})}),(0,o.jsxs)(i.p,{children:["For more information about how to run Docker containers, execute ",(0,o.jsx)(i.code,{children:"docker run --help"})," or\nvisit ",(0,o.jsx)(i.a,{href:"https://docs.docker.com/engine/reference/run/",children:"its online documentation"}),"."]})]}),"\n",(0,o.jsx)(i.p,{children:"When the simulation is finished, the last line of terminal should say whether the simulation was successful, for example:"}),"\n",(0,o.jsx)(t.A,{prompt:"~/workdir$",title:"Running DuneCopasi",children:[{input:"docker run -v $PWD:/dunecopasi dune-copasi --config=config.ini",output:["[2024-03-21 12:38:32.479] [info] Reading configuration file '~/workdir/config.ini'","[2024-03-21 12:38:32.479] [info] Starting dune-copasi (version: 2.0.0)",'[2024-03-21 12:38:32.580] [info] Axis names are set to: ["x", "y", "z"]',"...","...","[2024-03-21 12:38:32.723] [info] dune-copasi successfully finished :)"]}]}),"\n",(0,o.jsx)(i.h2,{id:"build-local-docker-image",children:"Build local Docker image"}),"\n",(0,o.jsxs)(i.p,{children:["Advanced users, who may want to make modifications the DuneCopasi\ncode but do not want to install all the dependencies may opt for a local ",(0,o.jsx)(i.a,{href:"https://docs.docker.com/build/",children:"Docker Build"}),".\nFor this, you must download the DuneCopasi source code, modify it as needed, and build\na new local Docker image as follows:"]}
1),"\n",(0,o.jsx)(i.pre,{children:(0,o.jsx)(i.code,{className:"language-bash",children:"# fetch source code from git\ngit clone https://gitlab.dune-project.org/copasi/dune-copasi\n\n# enter dune-copasi directory\ncd dune-copasi\n\n# checkout the branch you want to modify (e.g. latest)\ngit checkout latest\n\n# modify source code at will\n# ...\n\n# build a new docker image from modified code (tag: dune-copasi)\ndocker build -t dune-copasi .\n\n# (optional) run unit, system and tutorial tests on the new docker image\ndocker build --target test-env -t dune-copasi-test .\n"})}),"\n",(0,o.jsxs)(i.p,{children:["This will build all dune dependencies as well as the new modified version of the ",(0,o.jsx)(i.code,{children:"dune-copasi"})," executable within the Docker container.\nRunning the program works exactly as we discussed ",(0,o.jsx)(i.a,{href:"#run-the-program",children:"above"}),"."]})]})}function g(e={}){const{wrapper:i}={...(0,r.R)(),...e.components};return i?(0,o.jsx)(i,{...e,children:(0,o.jsx)(m,{...e})}):m(e)}},2826:(e,i,n)=>{n.d(i,{A:()=>t});n(6540);var o=n(1308),r=n(4848);function t(e){let{children:i,prompt:n,title:t}=e;n=n||"~$";const s={custom:{themeBGColor:"rgb(41, 45, 62)",themeToolbarColor:"#ffffff1a",themeColor:"rgb(191, 199, 213)",themePromptColor:"rgb(130, 170, 255)"}},a=e=>(0,r.jsx)("span",{style:{color:s.custom.themePromptColor,WebkitUserSelect:"none",KhtmlUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",OUserSelect:"none",userSelect:"none"},children:e}),l=(0,r.jsx)("span",{style:{whiteSpace:"pre-wrap"},children:i.map(((e,i)=>(0,r.jsxs)("span",{children:[a(e.prompt?e.prompt:n)," ",(0,r.jsx)("span",{children:Array.isArray(e.input)?e.input.map(((e,i)=>(0,r.jsxs)("span",{children:[e," ",(0,r.jsx)("br",{})]},i))):(0,r.jsxs)("span",{children:[" ",e.input," ",(0,r.jsx)("br",{})]})}),e.output&&e.output.map(((e,i)=>(0,r.jsxs)("span",{children:[e," ",(0,r.jsx)("br",{})]},i)))]},i)))}),d={display:"inline-block",width:"10px",float:"left",height:"10px",background:"#f9f9f9",borderRadius:"50%",margin:"8px 4px 0 0"};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{style:{width:"100%",borderRadius:"7px 7px 7px 7px",WebkitBoxShadow:"rgba(0, 0, 0, 0.3) 0 1px 3px",MozBoxShadow:"rgba(0,0,0,0.3) 0 1px 3px",BoxShadow:"rgba(0, 0, 0, 0.3) 0 1px 3px",WebkitFontSmoothing:"antialiased",textRendering:"optimizelegibility"},children:(0,r.jsx)("div",{style:{width:"100%",position:"relative",WebkitBoxSizing:"border-box",borderRadius:"7px 7px 7px 7px"},children:(0,r.jsxs)("div",{style:{background:"rgb(244,244,239)",width:"100%",borderRadius:"7px 7px 7px 7px"},children:[(0,r.jsxs)("div",{style:{height:"25px",padding:"0px 10px",color:"#4d494d",textAlign:"center",fontFamily:"HelveticaNeue, 'Helvetica Neue', 'Lucida Grande', Arial, sans-serif"},children:[(0,r.jsx)("div",{style:{...d,background:"#FF6057",border:"1px solid #E14640"}}),(0,r.jsx)("div",{style:{...d,background:"#FFBD2E",border:"1px solid #DFA123"}}),(0,r.jsx)("div",{style:{...d,background:"rgba(218, 218, 213)",border:"1px solid rgba(203, 203, 196)"}}),(0,r.jsx)("div",{style:{height:"10px",textAlign:"center",fontSize:14,opacity:.75,WebkitFontSmoothing:"antialiased",textRendering:"optimizelegibility"},children:t&&(0,r.jsx)(r.Fragment,{children:t})})]}),(0,r.jsx)("div",{style:{width:"100%",background:"rgb(41,45,62)",margin:"0px auto",borderRadius:"0px 0px 7px 7px",padding:"7px 7px 7px",position:"relative",WebkitBoxSizing:"border-box",boxSizing:"border-box"},children:(0,r.jsx)(o.XL,{children:(0,r.jsx)(o.e,{prompt:n,theme:"custom",themes:s,showControlButtons:!1,welcomeMessage:l,enableInput:!1,showControlBar:!1})})})]})})}),(0,r.jsx)("br",{})]})}},1543:(e,i,n)=>{n.d(i,{A:()=>t});var o=n(2826),r=n(4848);function t(e){let{prefix:i}=e;return i=i||"",(0,r.jsx)(o.A,{title:"Command Line Interface of DuneCopasi",children:[{input:`${i}
1dune-copasi --help`,output:["USAGE: dune-copasi [options]","","Numerical simulator for diffusion-reaction systems on single or multiple compartments","","Website: <https://dune-copasi.netlify.app>","","OPTIONS:","","  -h / --help          - Display this help.","  --help-full          - Display this help with long descriptions.","  --version            - Display the version of this program.","  --parser-default     - Display the default parser.","  --parser-list        - Display the parsers available for this program.","  --dimension-list     - Display the grid dimensions available for this program.","  --dump-config        - Dumps configuration in the INI format to stdout.","  --config=<string>    - Specifies a config file in INI format. See Configuration Options.","  --{key}={value}      - Overrides key=value sections of the config file. See Configuration Options.","","..."]}]})}},2478:(e,i,n)=>{n.d(i,{A:()=>o});const o="[grid]\ndimension = 2\nextensions = 2 2\norigin = -1 -1\nrefinement_level = 5\n\n[compartments.domain]\ntype = expression\nexpression = 1\n\n[model.scalar_field.u]\ncompartment = domain\ncross_diffusion.u.expression = 0.005\ninitial.expression = exp(-(position_x^2+position_y^2+position_z^2)/(4*0.005)) / (4*3.14159265359*0.005)\nstorage.expression = 1\n\n[model.time_step_operator]\ntime_begin = 1\ntime_end = 4\n"}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.