You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -27,6 +28,25 @@ OpenFermion (or any of its plugins) using the standard procedure.
27
28
28
29
## Setting up Docker for the first time
29
30
31
+
The Dockerfile is based on the [Ubuntu image](https://hub.docker.com/_/ubuntu) (ver. 22.04).
32
+
It creates a Python (ver. 3.12) virtual environemnt (named `fermion`) using Miniconda and installs all dependencies within it. Psi4 is installed with a conda [command](https://psicode.org/installs/v191/).
33
+
The default configuration uses the Miniconda installer (ver. 25.5.1-1) for Python 3.12 on Linux `aarch64` architecture.
34
+
35
+
### Customizing the Environment
36
+
You can manually edit the Dockerfile if you need to set up a different development environment (e.g., change the Ubuntu, Python, Miniconda, or Psi4 version).
37
+
38
+
If your local machine builds Linux `x86_64` architecture with the Dockerfile, the `wget` command
39
+
for the Miniconda installer (Line 40 in the Dockerfile)
You can check other Miniconda installers [here](https://repo.anaconda.com/miniconda/).
48
+
49
+
### Building Docker Image
30
50
You first need to install [Docker](https://www.docker.com/).
31
51
Once Docker is setup, one can navigate to the folder containing the
32
52
Dockerfile for building the OpenFermion image (docker/dockerfile) and run
@@ -39,31 +59,14 @@ where "openfermion_docker" is just an arbitrary name for our docker image.
39
59
Building the Dockerfile starts from a base image of Ubuntu and then installs
40
60
OpenFermion, its plugins, and the necessary applications needed for running these
41
61
programs. This is a fairly involved setup and will take some time
42
-
(perhaps up to thiry minutes depending on the computer). Once installation has
43
-
completed, run the image with
62
+
(perhaps up to thirty minutes depending on the computer) and disk space (several gigabytes). Once installation has completed, run the image with
44
63
45
64
```
46
-
docker run -it openfermion_docker
65
+
docker run -it --name openfermion_container -v $(pwd):/root/workspace openfermion_docker
47
66
```
48
-
49
-
With this command the terminal enters a new environment which emulates Ubuntu with
50
-
OpenFermion and accessories installed. To transfer files from somewhere on the disk to the Docker
51
-
container, first run `docker ps` in a separate terminal from the one running
52
-
Docker. This returns a list of running containers, e.g.:
53
-
54
-
```
55
-
+CONTAINER ID IMAGE COMMAND CREATED
56
-
+STATUS PORTS NAMES
57
-
+3cc87ed4205b 5a67a4d66d05 "/bin/bash" 2 hours ago
58
-
+Up 2 hours competent_feynman
59
-
```
60
-
61
-
In this example, the container name is "competent_feynman" (the name is
62
-
random and generated automatically). Using this name, one can then copy
63
-
files into the active Docker session from other terminal using:
64
-
67
+
where "openfermion_container" is an arbitrary choice for the name of our docker container. This command will mount your current local directory to `/root/workspace` inside the running container. You can activate the virtual environment `fermion` in the container with
65
68
```
66
-
docker cp [path to file on disk] [container name]:[path in container]
69
+
source activate fermion
67
70
```
68
71
69
72
An alternative way of loading files onto the Docker container is through
0 commit comments