Dockerfile respository for different tasks.
If you click on any template below, you will see a guide on how to use it.
-
Coding:
-
pycharm: development environment with CUDA + pyenv + PyCharm
-
pytorch: development environment with CUDA + pyenv + PyTorch
-
pytorch-with-charm: development environment with CUDA + pyenv + PyTorch + PyCharm
-
pytorch-with-vscode: development environment with CUDA + pyenv + PyTorch + vscode
-
pytorch-with-charm-mmf: development environment with CUDA + pyenv + PyTorch + PyCharm + MMF
-
Clone this repository:
$ git clone https://github.com/luiscarlosgph/docker-templates.git $ cd docker-templates
-
Build the image you want to deploy:
$ cd <image_dir> $ chmod +x build.sh $ ./build.sh <your_favourite_image_name>
For example, for the
luiscarlosgph/pycharm:latest
image:$ cd pycharm $ chmod +x build.sh $ ./build.sh luiscarlosgph/pycharm:latest
You do not need to follow the
luiscarlosgph/pycharm:latest
syntax, you can simply writewhatever
as name of the image. -
Launch container:
$ python -m dockerx.run --name <container_name> --image <image_name> --nvidia 1 --command 'sleep infinity'
For example, for the
luiscarlosgph/pycharm:latest
image:$ python -m dockerx.run --name wild_turin --image luiscarlosgph/pycharm:latest --nvidia 1 --command 'sleep infinity'
dockerx also allows you to mount volumes and set environment variables using the parameters
--volume
and--env
. More info here. -
Get a terminal of the container:
$ docker exec -it <container_name> <terminal_path>
For example, for the container named
wild_turin
:docker exec -it wild_turin /bin/bash
More info on the parameters of
docker exec
here.