Base-Images/docker/Dockerfile.gpu
KIMB-technologies 5f54f79445
All checks were successful
Build and push Docker image in git push / build (push) Successful in 57s
Remove APEX
2024-10-04 19:40:47 +02:00

30 lines
977 B
Docker

# 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 --break-system-packages \
torch --index-url https://download.pytorch.org/whl/cu124
# 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"]