Skip to content

How to use pfd‐parallel via Docker

qun edited this page Sep 12, 2024 · 6 revisions

(Work In Progress)

After finishing the installation of pfd-parallel in the docker, we are ready to actually use the pfd-parallel via docker. Before we start, you probably have prepared your computational files in some directory, which is certainly not inside the docker. One can just mount this working directory into the docker container, it will allow the docker container to modify this directory in real-time.

We can start a new container from the image where the pfd-parallel is installed:

docker run -it -v <local-working-directory>:<directory-in-container> --hostname <hostname> --user <usrname> ubuntu-for-pfd -e USER=<username>

In this line, we use the option -v to mount a local working directory into the docker container and specify its path as <directory-in-container>, we also set up the hostname and username, which is necessary for the ssh service. Additionally, the environment variable USER should be set as the <username> to make the ssh service work properly. Alternatively, this can be set by export USER=$(whoami) after we login the docker container. Note that running this line may take a while.

After login, one shall set up the ssh service as instructed in this page, and make sure that you can ssh to the localhost without password:

ssh localhost

After that, one can try the included example as shown in this page or run their own scripts.