fffiloni commited on
Commit
c813a1c
·
verified ·
1 Parent(s): 030b824

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +20 -11
Dockerfile CHANGED
@@ -27,21 +27,30 @@ WORKDIR $HOME/app
27
 
28
  # Install system dependencies as root
29
  USER root
30
- RUN apt-get update && apt-get install -y --no-install-recommends \
 
 
 
31
  git \
32
- cmake \
33
- build-essential \
34
- libgl1-mesa-glx \
35
- libglib2.0-0 \
36
- ffmpeg \
37
  python3.9 \
38
- python3-pip \
39
  python3.9-dev \
40
- && rm -rf /var/lib/apt/lists/*
41
 
42
- # Set Python 3.9 as the default python and pip versions
43
- RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1
44
- RUN update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1
 
 
 
 
 
 
 
 
45
 
46
  USER user
47
  # Copy dependencies and install them via pip
 
27
 
28
  # Install system dependencies as root
29
  USER root
30
+ # Install basic utilities and Python 3.9
31
+ RUN apt-get update && apt-get install -y \
32
+ wget \
33
+ curl \
34
  git \
35
+ software-properties-common \
36
+ && add-apt-repository ppa:deadsnakes/ppa -y && \
37
+ apt-get update && apt-get install -y \
 
 
38
  python3.9 \
39
+ python3.9-distutils \
40
  python3.9-dev \
41
+ && apt-get clean && rm -rf /var/lib/apt/lists/*
42
 
43
+ # Install pip for Python 3.9
44
+ RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.9
45
+
46
+ # Set Python 3.9 as the default Python version
47
+ RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1 && \
48
+ update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1 && \
49
+ update-alternatives --config python <<< '1' && \
50
+ update-alternatives --config python3 <<< '1'
51
+
52
+ # Verify Python and pip versions
53
+ RUN python --version && pip --version
54
 
55
  USER user
56
  # Copy dependencies and install them via pip