ruslanmv commited on
Commit
d75ee3d
1 Parent(s): 329f9c0

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +39 -4
Dockerfile CHANGED
@@ -1,7 +1,42 @@
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
-
4
- FROM python:3.9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
 
6
  WORKDIR /code
7
 
 
1
+ FROM nvidia/cuda:11.3.1-base-ubuntu20.04
2
+
3
+ ENV DEBIAN_FRONTEND=noninteractive \
4
+ TZ=Europe/Paris
5
+
6
+ # Remove any third-party apt sources to avoid issues with expiring keys.
7
+ # Install some basic utilities
8
+ RUN rm -f /etc/apt/sources.list.d/*.list && \
9
+ apt-get update && apt-get install -y --no-install-recommends \
10
+ curl \
11
+ ca-certificates \
12
+ sudo \
13
+ git \
14
+ git-lfs \
15
+ zip \
16
+ unzip \
17
+ htop \
18
+ bzip2 \
19
+ libx11-6 \
20
+ build-essential \
21
+ libsndfile-dev \
22
+ software-properties-common \
23
+ && rm -rf /var/lib/apt/lists/*
24
+
25
+ # Install Python 3.10 and pip
26
+ RUN add-apt-repository ppa:deadsnakes/ppa && \
27
+ apt-get update && apt-get install -y --no-install-recommends \
28
+ python3.10 \
29
+ python3.10-distutils \
30
+ && rm -rf /var/lib/apt/lists/* && \
31
+ update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1 && \
32
+ update-alternatives --install /usr/bin/python python /usr/bin/python3.10 1 && \
33
+ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
34
+ python get-pip.py && \
35
+ rm get-pip.py
36
+
37
+ # Set Python 3.10 as the default python version
38
+ RUN update-alternatives --set python3 /usr/bin/python3.10 && \
39
+ update-alternatives --set python /usr/bin/python3.10
40
 
41
  WORKDIR /code
42