Docker Base Image Begin
This commit is contained in:
34
docker/Dockerfile.gpu
Normal file
34
docker/Dockerfile.gpu
Normal file
@@ -0,0 +1,34 @@
|
||||
# file initially based on https://github.com/huggingface/transformers/tree/master/docker
|
||||
|
||||
# FROM nvidia/cuda:11.1.1-cudnn8-devel-ubuntu20.04
|
||||
# FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04
|
||||
FROM nvidia/cuda:12.6.1-cudnn-devel-ubuntu24.04
|
||||
|
||||
RUN apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive TZ=Europe/Berlin apt-get install -y tzdata \
|
||||
&& cp /usr/share/zoneinfo/Europe/Berlin /etc/localtime \
|
||||
&& echo "Europe/Berlin" > /etc/timezone
|
||||
|
||||
RUN apt update && \
|
||||
apt install -y bash \
|
||||
build-essential \
|
||||
git \
|
||||
curl \
|
||||
ca-certificates \
|
||||
python3-dev \
|
||||
python3-pip \
|
||||
libopenmpi-dev && \
|
||||
rm -rf /var/lib/apt/lists
|
||||
|
||||
RUN python3 -m pip install --no-cache-dir \
|
||||
torch --index-url https://download.pytorch.org/whl/cu124
|
||||
|
||||
RUN git clone https://github.com/NVIDIA/apex
|
||||
RUN cd apex && \
|
||||
pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation --config-settings "--build-option=--cpp_ext" --config-settings "--build-option=--cuda_ext" ./
|
||||
|
||||
# fix library path for tensorflow and link a file
|
||||
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/cuda/lib64"
|
||||
RUN ln -s /usr/local/cuda/lib64/libcusolver.so.11 /usr/local/cuda/lib64/libcusolver.so.10
|
||||
|
||||
CMD ["/bin/bash"]
|
||||
Reference in New Issue
Block a user