-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
moving to nvidia dockerfile and python 3.10
- Loading branch information
Showing
6 changed files
with
17 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
wandb/ | ||
tmp/ | ||
outputs/ | ||
results/ | ||
models/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,22 @@ | ||
FROM nvidia/cuda:11.8.0-devel-ubuntu22.04 | ||
|
||
# install python | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
ARG PYTHON_VERSION=3.10 | ||
#setting language and locale | ||
ENV LANG="C.UTF-8" LC_ALL="C.UTF-8" | ||
|
||
|
||
RUN apt-get update && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get -qq -y install \ | ||
software-properties-common \ | ||
build-essential \ | ||
curl \ | ||
ffmpeg \ | ||
git \ | ||
htop \ | ||
vim \ | ||
nano \ | ||
rsync \ | ||
wget \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN add-apt-repository ppa:deadsnakes/ppa | ||
RUN apt-get update && apt-get install -y -qq python${PYTHON_VERSION} \ | ||
python${PYTHON_VERSION}-dev \ | ||
python${PYTHON_VERSION}-distutils | ||
|
||
# Set python aliases | ||
RUN update-alternatives --install /usr/bin/python python /usr/bin/python${PYTHON_VERSION} 1 | ||
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python${PYTHON_VERSION} 1 | ||
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python get-pip.py | ||
FROM nvcr.io/nvidia/jax:23.10-py3 | ||
|
||
# default workdir | ||
WORKDIR /home/workdir | ||
COPY . . | ||
|
||
#jaxmarl from source if needed, all the requirements | ||
RUN pip install --ignore-installed -e '.[qlearning, dev]' | ||
|
||
# install jax from to enable cuda | ||
RUN pip install --upgrade "jax[cuda11_pip]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html | ||
|
||
RUN pip install torch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2 --index-url https://download.pytorch.org/whl/cu118 | ||
|
||
RUN pip install -e . | ||
|
||
#disabling preallocation | ||
RUN export XLA_PYTHON_CLIENT_PREALLOCATE=false | ||
#safety measures | ||
RUN export XLA_PYTHON_CLIENT_MEM_FRACTION=0.25 | ||
RUN export TF_FORCE_GPU_ALLOW_GROWTH=true | ||
|
||
#for jupyter | ||
EXPOSE 9999 | ||
# if you want jupyter | ||
RUN pip install pip install jupyterlab | ||
|
||
#for secrets and debug | ||
ENV WANDB_API_KEY="" | ||
ENV WANDB_ENTITY="" | ||
RUN git config --global --add safe.directory /home/workdir | ||
|
||
CMD ["/bin/bash"] | ||
RUN git config --global --add safe.directory /home/workdir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,6 @@ include = ['jaxmarl*'] | |
[tool.setuptools.dynamic] | ||
version = {attr = "jaxmarl.__version__"} | ||
dependencies = {file = ["requirements/requirements.txt"]} | ||
optional-dependencies = {dev = { file = ["requirements/requirements-dev.txt"] }, qlearning = { file = ["requirements/requirements-qlearning.txt"] }} | ||
|
||
[project] | ||
name = "jaxmarl" | ||
|
@@ -18,14 +17,13 @@ description = "Multi-Agent Reinforcement Learning with JAX" | |
authors = [ | ||
{name = "Foerster Lab for AI Research", email = "[email protected]"}, | ||
] | ||
dynamic = ["version", "dependencies", "optional-dependencies"] | ||
dynamic = ["version", "dependencies"] | ||
license = {file = "LICENSE"} | ||
requires-python = ">=3.8" | ||
requires-python = ">=3.10" | ||
classifiers = [ | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Intended Audience :: Developers", | ||
"Intended Audience :: Science/Research", | ||
"Operating System :: OS Independent", | ||
|