Gregniuki commited on
Commit
c0428fb
1 Parent(s): a01a216

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +19 -16
Dockerfile CHANGED
@@ -1,10 +1,13 @@
1
  # read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
2
  # you will also find guides on how best to write your Dockerfile
3
- FROM debian:bullseye
4
-
5
- RUN dpkg --add-architecture amd64
6
- RUN apt-get update && \
7
- apt-get install -y --no-install-recommends gnupg2 curl ca-certificates
 
 
 
8
  #RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/debian11/x86_64/7fa2af80.pub
9
 
10
  # Import the NVIDIA GPG key
@@ -40,30 +43,30 @@ RUN apt-get update && \
40
  #RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/debian11/x86_64/7fa2af80.pub
41
  #RUN apt-key adv --recv-keys --keyserver keys.gnupg.net F60F4B3D7FA2AF80
42
  # Fetch the NVIDIA repository GPG key
43
- RUN curl -fsSL https://developer.download.nvidia.com/compute/cuda/repos/debian11/x86_64/7fa2af80.pub | gpg --dearmor -o /usr/share/keyrings/cuda-archive-keyring.gpg
44
 
45
  # Add the NVIDIA repository to the APT sources list
46
- RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/cuda-archive-keyring.gpg] https://developer.download.nvidia.com/compute/cuda/repos/debian11/x86_64 /" > /etc/apt/sources.list.d/cuda.list
47
- RUN curl -fsSL https://developer.download.nvidia.com/compute/cuda/repos/debian11/x86_64/7fa2af80.pub > 7fa2af80.pub
48
- RUN gpg --import 7fa2af80.pub
49
 
50
- RUN gpg --list-sigs [email protected]
51
- RUN gpg --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/debian11/x86_64/7fa2af80.pub
52
 
53
  # Update package lists
54
 
55
 
56
- RUN apt-get update
57
- RUN gpg --delete-key A4B469963BF863CC
58
 
59
  #RUN echo "deb https://developer.download.nvidia.com/compute/cuda/repos/debian11/x86_64 /" | sudo tee /etc/apt/sources.list.d/cuda.list
60
  #USER root
61
  #RUN echo "deb https://developer.download.nvidia.com/compute/cuda/repos/debian11/x86_64 /" > /etc/apt/sources.list.d/cuda.list
62
 
63
  # Install FFmpeg
64
- #RUN apt-get update && \
65
- RUN apt-get install -y python3-pip ffmpeg libcublas-dev
66
- ENV LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
67
 
68
  # Use the official Python 3.9 image as the base image
69
  #FROM python:3.9
 
1
  # read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
2
  # you will also find guides on how best to write your Dockerfile
3
+ FROM debian:bullseye-slim
4
+ ENV NVIDIA_VISIBLE_DEVICES all
5
+ ENV NVIDIA_DRIVER_CAPABILITIES compute,utility
6
+ ENV NVIDIA_REQUIRE_CUDA "cuda>=8.0"
7
+ ENV LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
8
+ #RUN dpkg --add-architecture amd64
9
+ #RUN apt-get update && \
10
+ # apt-get install -y --no-install-recommends gnupg2 curl ca-certificates
11
  #RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/debian11/x86_64/7fa2af80.pub
12
 
13
  # Import the NVIDIA GPG key
 
43
  #RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/debian11/x86_64/7fa2af80.pub
44
  #RUN apt-key adv --recv-keys --keyserver keys.gnupg.net F60F4B3D7FA2AF80
45
  # Fetch the NVIDIA repository GPG key
46
+ #RUN curl -fsSL https://developer.download.nvidia.com/compute/cuda/repos/debian11/x86_64/7fa2af80.pub | gpg --dearmor -o /usr/share/keyrings/cuda-archive-keyring.gpg
47
 
48
  # Add the NVIDIA repository to the APT sources list
49
+ #RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/cuda-archive-keyring.gpg] https://developer.download.nvidia.com/compute/cuda/repos/debian11/x86_64 /" > /etc/apt/sources.list.d/cuda.list
50
+ #RUN curl -fsSL https://developer.download.nvidia.com/compute/cuda/repos/debian11/x86_64/7fa2af80.pub > 7fa2af80.pub
51
+ #RUN gpg --import 7fa2af80.pub
52
 
53
+ #RUN gpg --list-sigs [email protected]
54
+ #RUN gpg --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/debian11/x86_64/7fa2af80.pub
55
 
56
  # Update package lists
57
 
58
 
59
+ #RUN apt-get update
60
+ #RUN gpg --delete-key A4B469963BF863CC
61
 
62
  #RUN echo "deb https://developer.download.nvidia.com/compute/cuda/repos/debian11/x86_64 /" | sudo tee /etc/apt/sources.list.d/cuda.list
63
  #USER root
64
  #RUN echo "deb https://developer.download.nvidia.com/compute/cuda/repos/debian11/x86_64 /" > /etc/apt/sources.list.d/cuda.list
65
 
66
  # Install FFmpeg
67
+ RUN apt-get update && \
68
+ RUN apt-get install -y python3-pip ffmpeg
69
+
70
 
71
  # Use the official Python 3.9 image as the base image
72
  #FROM python:3.9