Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +30 -36
Dockerfile
CHANGED
@@ -1,50 +1,44 @@
|
|
1 |
-
FROM nvidia/cuda:11.
|
2 |
|
3 |
-
|
4 |
-
|
5 |
|
6 |
-
#
|
7 |
-
|
|
|
|
|
8 |
curl \
|
9 |
ca-certificates \
|
10 |
sudo \
|
11 |
git \
|
|
|
|
|
|
|
|
|
12 |
bzip2 \
|
13 |
libx11-6 \
|
|
|
|
|
|
|
14 |
&& rm -rf /var/lib/apt/lists/*
|
15 |
|
16 |
-
#
|
17 |
-
RUN
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
ENV HOME=/home/user
|
28 |
-
RUN mkdir $HOME/.cache $HOME/.config \
|
29 |
-
&& chmod -R 777 $HOME
|
30 |
-
|
31 |
-
# Download and install Micromamba.
|
32 |
-
RUN curl -sL https://micro.mamba.pm/api/micromamba/linux-64/1.1.0 \
|
33 |
-
| sudo tar -xvj -C /usr/local bin/micromamba
|
34 |
-
ENV MAMBA_EXE=/usr/local/bin/micromamba \
|
35 |
-
MAMBA_ROOT_PREFIX=/home/user/micromamba \
|
36 |
-
CONDA_PREFIX=/home/user/micromamba \
|
37 |
-
PATH=/home/user/micromamba/bin:$PATH
|
38 |
|
39 |
-
# Set
|
40 |
-
|
41 |
-
|
42 |
-
&& rm /app/conda-linux-64.lock \
|
43 |
-
&& micromamba shell init --shell=bash --prefix="$MAMBA_ROOT_PREFIX" \
|
44 |
-
&& micromamba clean -qya
|
45 |
|
46 |
-
|
47 |
-
RUN ln -s "$CONDA_PREFIX/lib/libnvrtc.so.11.8.89" "$CONDA_PREFIX/lib/libnvrtc.so"
|
48 |
|
49 |
|
50 |
WORKDIR /code
|
@@ -69,4 +63,4 @@ WORKDIR $HOME/app
|
|
69 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
70 |
COPY --chown=user . $HOME/app
|
71 |
|
72 |
-
CMD ["python", "main.py"]
|
|
|
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 |
+
RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 -y
|
|
|
42 |
|
43 |
|
44 |
WORKDIR /code
|
|
|
63 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
64 |
COPY --chown=user . $HOME/app
|
65 |
|
66 |
+
CMD ["python", "main.py"]
|