Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Containerization support #12

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

DimitriosBellos
Copy link

@DimitriosBellos DimitriosBellos commented Feb 23, 2023

This pull request contains 2 Dockerfile files to construct 2 Docker images. One that will work for the 2d_cnn scripts using Ubuntu 18.04 and CUDA 10.0 and another for the 3d_cnn, spectrum filter and addtional_scripts scripts using Ubuntu 20.04 and CUDA 11.6. The reason I am using separate images is because the 3d_cnn sripts were written recently (within 2022) with the most up to date pytorch version at the time being pytorch 1.12 (which is only available for CUDA 11.6, 11.3 and 10.2). To also accommodate the installation of pytorch from the recommended conda channel (-c pytorch as you can see here ) I properly ammended the environment.yml file in the 3d_cnn directory. I also include some deploy_*.sh files that help with the proper execution of Docker images.

For the Docker image regarding the 2d_cnn scripts, it can be build as such:

cd DeePicT
docker build . -f Dockerfile-2d_cnn -t deepict:v1.0.1-2d-cnn

and run like this (<data_directory> has to be replaced appropriately):

docker run --gpus all -v <data_directory>:/mnt --workdir=/mnt -it --rm deepict:v1.0.1-2d-cnn

Within the container first run:

source activate snakemake-keras

Then you may use:

deepict2D_config <template_config_name>.yaml

To create a template config file named <sample_config_name>.yaml in the present working directory.
And after modifying it you may run:

deepict2D <template_config_name>.yaml

Which is similar on doing bash 2d_cnn/deploy_local.sh <template_config_name>.yaml

For the Docker image regarding the 3d_cnn scripts, it can be build as such:

cd DeePicT
docker build . -f Dockerfile-3d_cnn -t deepict:v1.0.1-3d-cnn

and run like this (<data_directory> has to be replaced appropriately):

docker run --gpus all -v <data_directory>:/mnt --workdir=/mnt -it --rm deepict:v1.0.1-3d-cnn

Within the container first run:

source activate 3d-unet

Then you may use:

deepict3D_config <template_config_name>.yaml

To create a template config file named <sample_config_name>.yaml in the present working directory.
And after modifying it you may run:

deepict3D <template_config_name>.yaml

Which is similar on doing bash 3d_cnn/deploy_local.sh <template_config_name>.yaml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant