Skip to content

Commit

Permalink
container fallback to 18.04
Browse files Browse the repository at this point in the history
  • Loading branch information
ghostplant committed Oct 26, 2023
1 parent 6986e99 commit bf22d79
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions docker/Dockerfile.c-cuda
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu20.04
FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu18.04
# FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu20.04

ENV DEBIAN_FRONTEND noninteractive
ENV PYTHONDONTWRITEBYTECODE 1
Expand All @@ -8,13 +9,18 @@ ENV LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:/usr/local/cuda/compat:$LD_LIBRARY
RUN env > /etc/environment

RUN apt-get update && apt install -y --no-install-recommends git ca-certificates \
python3-pip python3-wheel python3-setuptools python3-dev python3-pytest \
python3-distutils python3.8-dev \
vim-tiny less netcat-openbsd inetutils-ping curl patch iproute2 \
g++ libpci3 libnuma-dev make file openssh-server kmod gdb libopenmpi-dev openmpi-bin psmisc \
autoconf automake autotools-dev libtool \
zlib1g-dev rename zip unzip librdmacm-dev gnupg \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

RUN ln -sf python3.8 /usr/bin/python3
RUN ln -sf python3 /usr/bin/python
RUN ln -sf python /usr/bin/python.exe
RUN curl -LO https://bootstrap.pypa.io/get-pip.py && python3 get-pip.py && rm -f get-pip.py

RUN /bin/echo -e "set backspace=indent,eol,start\nset nocompatible\nset ts=4" > /etc/vim/vimrc.tiny

RUN [ -e /usr/lib/x86_64-linux-gnu/libcuda.so.1 ] || ln -s /host/usr/lib/x86_64-linux-gnu/libcuda.so.1 /usr/lib/x86_64-linux-gnu
Expand All @@ -23,5 +29,6 @@ RUN ln -sf libcudart.so /usr/local/cuda/targets/x86_64-linux/lib/libcudart_stati
ENV LD_LIBRARY_PATH=/usr/local/nvidia/lib64:$LD_LIBRARY_PATH
RUN pip3 install --upgrade antares && mkdir -p /root/.local/antares && mv $(antares pwd)/../3rdparty /root/.local/antares/3rdparty && pip3 uninstall antares -y && echo 'exec /antares/main.py "$@"' > /usr/local/bin/antares && chmod a+x /usr/local/bin/antares

RUN python3 -m pip install torch==2.0.0 --index-url https://download.pytorch.org/whl/cu117
RUN python3 -m pip install cython
RUN python3 -m pip install torch==2.0.0 --index-url https://download.pytorch.org/whl/cu118
RUN python3 -m pip install setuptools

0 comments on commit bf22d79

Please sign in to comment.