-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
1 addition
and
21 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 |
---|---|---|
@@ -1,39 +1,19 @@ | ||
# Description: Dockerfile for JAX with CUDA support | ||
FROM nvidia/cuda:12.0.0-cudnn8-devel-ubuntu20.04 | ||
|
||
# Set the working directory | ||
WORKDIR /workspace | ||
|
||
# Set the environment variables | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Install the required packages and python | ||
RUN apt-get update && \ | ||
apt-get install -y curl software-properties-common && \ | ||
add-apt-repository ppa:deadsnakes/ppa | ||
|
||
# actual installation of python | ||
RUN apt-get update && \ | ||
apt-get install -y python3.11 python3.11-distutils libglfw3-dev git | ||
|
||
# Install pip | ||
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \ | ||
python3.11 get-pip.py --force-reinstall && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Copy the requirements file | ||
COPY requirements.txt . | ||
|
||
# Install the required packages | ||
RUN python3.11 -m pip install -r requirements.txt | ||
|
||
# Install JAX with CUDA support. | ||
RUN python3.11 -m pip install --upgrade \ | ||
pip install -U "jax[cuda12]" \ | ||
optax | ||
|
||
# Set the environment variables | ||
ENV PYGLFW_PREVIEW=1 | ||
|
||
# Set the default python version | ||
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.11 1 | ||
miiiii "jax[cuda12]" optax |