Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +14 -10
Dockerfile
CHANGED
@@ -5,23 +5,27 @@ ENV DEBIAN_FRONTEND=noninteractive
|
|
5 |
# Create non-root user
|
6 |
RUN useradd -m -u 1000 user
|
7 |
|
8 |
-
# Install system dependencies
|
9 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
|
10 |
git \
|
11 |
cmake \
|
12 |
ninja-build \
|
13 |
build-essential \
|
14 |
libgl1-mesa-glx \
|
15 |
libglib2.0-0 \
|
16 |
-
ffmpeg
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
#
|
23 |
-
RUN
|
24 |
-
|
|
|
|
|
|
|
25 |
|
26 |
# Switch to non-root user
|
27 |
USER user
|
|
|
5 |
# Create non-root user
|
6 |
RUN useradd -m -u 1000 user
|
7 |
|
8 |
+
# Install system dependencies as root
|
9 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
10 |
+
software-properties-common \
|
11 |
git \
|
12 |
cmake \
|
13 |
ninja-build \
|
14 |
build-essential \
|
15 |
libgl1-mesa-glx \
|
16 |
libglib2.0-0 \
|
17 |
+
ffmpeg
|
18 |
+
|
19 |
+
# Add deadsnakes PPA and install Python 3.10 and related packages
|
20 |
+
RUN add-apt-repository ppa:deadsnakes/ppa && apt-get update && \
|
21 |
+
apt-get install -y python3.10 python3.10-dev python3.10-distutils python3.10-venv
|
22 |
+
|
23 |
+
# Install pip for Python 3.10
|
24 |
+
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10
|
25 |
+
|
26 |
+
# Set Python 3.10 as default
|
27 |
+
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.10 1 && \
|
28 |
+
update-alternatives --install /usr/bin/pip pip /usr/local/bin/pip 1
|
29 |
|
30 |
# Switch to non-root user
|
31 |
USER user
|