diff --git a/.devcontainer/cpu/devcontainer.json b/.devcontainer/cpu/devcontainer.json index 2f6faf8..60d4737 100644 --- a/.devcontainer/cpu/devcontainer.json +++ b/.devcontainer/cpu/devcontainer.json @@ -1,7 +1,4 @@ { "name": "muprl - CPU", - "build": { - "dockerfile": "../../Dockerfile_CPU" - }, - "runArgs": ["--rm"] + "image": "dockercontainervm/muprl-cpu:0.1.0" } \ No newline at end of file diff --git a/.devcontainer/gpu/devcontainer.json b/.devcontainer/gpu/devcontainer.json index 4252913..3c02e33 100644 --- a/.devcontainer/gpu/devcontainer.json +++ b/.devcontainer/gpu/devcontainer.json @@ -1,7 +1,4 @@ { "name": "muprl - GPU", - "build": { - "dockerfile": "../../Dockerfile_GPU" - }, - "runArgs": ["--rm", "--gpus", "all"] + "image": "dockercontainervm/muprl-gpu:0.1.0" } \ No newline at end of file diff --git a/Dockerfile_GPU b/Dockerfile_GPU index df67729..35f13d1 100644 --- a/Dockerfile_GPU +++ b/Dockerfile_GPU @@ -17,6 +17,7 @@ RUN echo "Installing requirements" \ && pip install gym==0.25.0 RUN echo "Installing jax cuda" \ + && pip install --upgrade pip \ && pip uninstall -y jax \ && pip uninstall -y jaxlib \ && pip install --upgrade "jax[cuda12_pip]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html diff --git a/README.md b/README.md index 554d9b4..e7cffba 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,28 @@ # 1. Setting up the environment -## 1.1 Build the docker container +## 1.1 Download the docker image + +If you do not have an NVIDIA GPU type: + +```commandline + +docker run -it -u ${UID} --rm --mount type=bind,source="$(pwd)",target=/home/muPRL --workdir /home/muPRL --name muPRL-container dockercontainervm/muprl-cpu:0.1.0 + +``` + +The command will download the container image `dockercontainervm/muprl-cpu:0.1.0` that should be around 2.6 GB. + +If you have an NVIDIA GPU, make sure to install the [Nvidia Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) and type: + +```commandline + +docker run --gpus all -it -u ${UID} --rm --mount type=bind,source="$(pwd)",target=/home/muPRL --workdir /home/muPRL --name muPRL-container dockercontainervm/muprl-gpu:0.1.0 + +``` + +The command will download the container image `dockercontainervm/muprl-gpu:0.1.0` that should be around * GB. + +## 1.2 (Optional): Build the docker container instead of step 1.1 If you do not have an NVIDIA GPU type: @@ -24,7 +46,7 @@ docker run --gpus all -it -u ${UID} --rm --mount type=bind,source="$(pwd)",targe The image size should be around 8 GB. -## 1.2 (Optional): Use VSCode Devcontainer instead of step 1.1 +## 1.3 (Optional): Use VSCode Devcontainer instead of step 1.1 - Download [VSCode](https://code.visualstudio.com/Download) for your platform; - Install DevContainer Extension;