fffiloni commited on
Commit
a8d5aa8
·
verified ·
1 Parent(s): 5d43b2b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. 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
- python3.9 \
18
- python3-pip \
19
- python3.9-dev \
20
- && rm -rf /var/lib/apt/lists/*
21
-
22
- # Set Python 3.9 as default
23
- RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1
24
- RUN update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1
 
 
 
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