Skip to content

Commit

Permalink
update README with docker images; update devcontainers with docker im…
Browse files Browse the repository at this point in the history
…ages
  • Loading branch information
matteobiagiola committed Aug 14, 2024
1 parent 06207cf commit 33ba735
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 10 deletions.
5 changes: 1 addition & 4 deletions .devcontainer/cpu/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"name": "muprl - CPU",
"build": {
"dockerfile": "../../Dockerfile_CPU"
},
"runArgs": ["--rm"]
"image": "dockercontainervm/muprl-cpu:0.1.0"
}
5 changes: 1 addition & 4 deletions .devcontainer/gpu/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"name": "muprl - GPU",
"build": {
"dockerfile": "../../Dockerfile_GPU"
},
"runArgs": ["--rm", "--gpus", "all"]
"image": "dockercontainervm/muprl-gpu:0.1.0"
}
1 change: 1 addition & 0 deletions Dockerfile_GPU
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
26 changes: 24 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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:

Expand All @@ -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;
Expand Down

0 comments on commit 33ba735

Please sign in to comment.