Skip to content

Commit 53c48af

Browse files
authored
Update index.md
1 parent 3cd1d68 commit 53c48af

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

docs/index.md

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -80,55 +80,54 @@ Other dependecies include:
8080

8181
If you would like to run PyBox within a Docker container, I have provided a Dockerfile that will automatically build all dependencies within a new container based on the Ubuntu:16.04 image. To build the new image, assuming you have Docker installed, run the following command in the directory of the supplied Dockerfile:
8282

83-
> docker build -t pybox .
83+
docker build -t pybox .
8484

8585
After this has completed [which may take some time], type the following to see your new image listed:
8686

87-
> docker images
87+
docker images
8888

8989
To create and run a new container based on this image, with a name 'project_pybox', type:
9090

91-
> docker run --name=project_pybox -it pybox
91+
docker run --name=project_pybox -it pybox
9292

9393
This will take you in to the container. So, lets run the gas phase model in PyBox whilst you are there. Change directory to where PyBox is located:
9494

95-
> cd /Code/Git_repos/PyBox/
95+
cd /Code/Git_repos/PyBox/
9696

9797
Lets run the default simulation:
9898

99-
> python Gas_simulation.py
99+
python Gas_simulation.py
100100

101101
Dont worry about the error message regarding the Matplotlib plots. This is a result of working in a Docker container. For those of you not familiar with Docker commands, lets leave the container. Type:
102102

103-
> exit
103+
exit
104104

105105
You are now back in your original 'host' operating system. To list all available containers, type:
106106

107-
> docker ps -a
107+
docker ps -a
108108

109109
You should see how long ago you exited our 'project_pybox' container. Lets restart this container. To do this type the following:
110110

111-
> docker start project_pybox
112-
> docker exec -it project_pybox bash
111+
docker start project_pybox
112+
docker exec -it project_pybox bash
113113

114114
We are back in! Lets exit again:
115115

116-
> exit
116+
exit
117117

118118
To remove the container, you can type:
119119

120-
> docker rm project_pybox
121-
120+
docker rm project_pybox
121+
122122
To remove the image on which the container is based, which was built from our Dockerfile, type:
123123

124-
> docker rmi pybox
125-
124+
docker rmi pybox
126125

127126
## Folder structure and running the model <a name="Folder-Structure"></a>
128127

129128
If you are happy all dependencies are installed and working, to run PyBox 'out of the box', type the following in the root directory:
130129

131-
> python Gas_simulation.py
130+
python Gas_simulation.py
132131

133132
If you are not in a Docker container, you will see a plot displaying the concentration of two compounds over time. To understand what this simulation has actually done, let us now discuss the repository structure.
134133

0 commit comments

Comments
 (0)