meg HF Staff commited on
Commit
e6fd5f0
·
verified ·
1 Parent(s): bdda622

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +22 -0
Dockerfile CHANGED
@@ -12,11 +12,33 @@ ARG PYTORCH_VERSION=2.1.0
12
  ARG PYTHON_VERSION=3.8.10
13
  ARG CUDA_VERSION=11.8
14
  ARG CU_DNN=8.5.0.96
 
15
  ARG CUDA_CHANNEL=nvidia
16
  ARG INSTALL_CHANNEL=pytorch
17
  # Automatically set by buildx
18
  ARG TARGETPLATFORM
19
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
 
21
  # Install pytorch
22
  # On arm64 we exit with an error code
 
12
  ARG PYTHON_VERSION=3.8.10
13
  ARG CUDA_VERSION=11.8
14
  ARG CU_DNN=8.5.0.96
15
+ ARG MAMBA_VERSION=24.3.0-0
16
  ARG CUDA_CHANNEL=nvidia
17
  ARG INSTALL_CHANNEL=pytorch
18
  # Automatically set by buildx
19
  ARG TARGETPLATFORM
20
 
21
+ # Update basic dependencies we'll be using.
22
+ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
23
+ build-essential \
24
+ ca-certificates \
25
+ ccache \
26
+ curl \
27
+ python3 \
28
+ python3-pip \
29
+ git && \
30
+ rm -rf /var/lib/apt/lists/*
31
+
32
+ # Install conda
33
+ # translating Docker's TARGETPLATFORM into mamba arches
34
+ RUN case ${TARGETPLATFORM} in \
35
+ "linux/arm64") MAMBA_ARCH=aarch64 ;; \
36
+ *) MAMBA_ARCH=x86_64 ;; \
37
+ esac && \
38
+ curl -fsSL -v -o ~/mambaforge.sh -O "https://github.com/conda-forge/miniforge/releases/download/${MAMBA_VERSION}/Mambaforge-${MAMBA_VERSION}-Linux-${MAMBA_ARCH}.sh"
39
+ RUN chmod +x ~/mambaforge.sh && \
40
+ bash ~/mambaforge.sh -b -p /opt/conda && \
41
+ rm ~/mambaforge.sh
42
 
43
  # Install pytorch
44
  # On arm64 we exit with an error code