|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FROM ubuntu:22.04 |
|
|
|
|
|
|
|
ENV LANG C.UTF-8 |
|
ENV SHELL=/bin/bash |
|
ENV DEBIAN_FRONTEND=noninteractive |
|
|
|
ENV APT_INSTALL="apt-get install -y --no-install-recommends" |
|
ENV PIP_INSTALL="python3 -m pip --no-cache-dir install --upgrade" |
|
ENV GIT_CLONE="git clone --depth 10" |
|
|
|
|
|
|
|
|
|
|
|
RUN apt-get update && \ |
|
$APT_INSTALL \ |
|
sudo \ |
|
build-essential \ |
|
ca-certificates \ |
|
wget \ |
|
curl \ |
|
git \ |
|
zip \ |
|
unzip \ |
|
nano \ |
|
ffmpeg \ |
|
software-properties-common \ |
|
gnupg \ |
|
python3 \ |
|
python3-pip \ |
|
python3-dev |
|
|
|
|
|
|
|
|
|
|
|
RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash && \ |
|
$APT_INSTALL git-lfs |
|
|
|
|
|
|
|
RUN ln -s /usr/bin/python3 /usr/local/bin/python |
|
|
|
|
|
|
|
|
|
RUN wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin && \ |
|
mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600 && \ |
|
wget https://developer.download.nvidia.com/compute/cuda/12.0.0/local_installers/cuda-repo-ubuntu2204-12-0-local_12.0.0-525.60.13-1_amd64.deb && \ |
|
dpkg -i cuda-repo-ubuntu2204-12-0-local_12.0.0-525.60.13-1_amd64.deb && \ |
|
cp /var/cuda-repo-ubuntu2204-12-0-local/cuda-*-keyring.gpg /usr/share/keyrings/ && \ |
|
apt-get update && \ |
|
$APT_INSTALL cuda && \ |
|
rm cuda-repo-ubuntu2204-12-0-local_12.0.0-525.60.13-1_amd64.deb |
|
|
|
|
|
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/3bf863cc.pub && \ |
|
add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/ /" && \ |
|
apt-get update && \ |
|
$APT_INSTALL libcudnn8=8.9.7.29-1+cuda12.2 \ |
|
libcudnn8-dev=8.9.7.29-1+cuda12.2 |
|
|
|
|
|
ENV PATH=$PATH:/usr/local/cuda/bin |
|
ENV LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 jupyterlab |
|
|
|
|
|
COPY requirements.txt /tmp/requirements.txt |
|
RUN $PIP_INSTALL -r /tmp/requirements.txt |
|
RUN rm /tmp/requirements.txt |
|
|
|
|
|
|
|
|
|
|
|
EXPOSE 8888 6006 |
|
|
|
CMD jupyter lab --allow-root --ip=0.0.0.0 --no-browser --ServerApp.trust_xheaders=True --ServerApp.disable_check_xsrf=False --ServerApp.allow_remote_access=True --ServerApp.allow_origin='*' --ServerApp.allow_credentials=True |