fffiloni commited on
Commit
8c81784
·
verified ·
1 Parent(s): 6f69003

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -7
Dockerfile CHANGED
@@ -1,15 +1,22 @@
1
- # Use a newer PyTorch image with Python 3.11
2
- FROM pytorch/pytorch:2.1.0-cuda11.8-cudnn8-runtime
3
 
4
  ENV DEBIAN_FRONTEND=noninteractive
5
 
6
- # Install system dependencies
7
  RUN apt-get update && apt-get install -y \
8
- git wget libgl1-mesa-glx libglib2.0-0 ffmpeg libx264-dev build-essential cmake \
9
- libboost-all-dev python3-dev
 
 
 
10
 
11
- # Install dlib via pip (Python 3.11 should be available now)
12
- RUN pip install --no-cache-dir dlib
 
 
 
 
13
 
14
  # Set up user
15
  RUN useradd -m -u 1000 user
 
1
+ # Use PyTorch 2.1.0 with CUDA 11.8 (devel version)
2
+ FROM pytorch/pytorch:2.1.0-cuda11.8-cudnn8-devel
3
 
4
  ENV DEBIAN_FRONTEND=noninteractive
5
 
6
+ # Install Python 3.11 explicitly
7
  RUN apt-get update && apt-get install -y \
8
+ python3.11 python3.11-dev python3.11-venv python3-pip \
9
+ git wget libgl1-mesa-glx libglib2.0-0 ffmpeg libx264-dev \
10
+ build-essential cmake libboost-all-dev && \
11
+ ln -sf /usr/bin/python3.11 /usr/bin/python && \
12
+ ln -sf /usr/bin/pip3 /usr/bin/pip
13
 
14
+ # Confirm Python version
15
+ RUN python --version
16
+
17
+ # Use a prebuilt dlib wheel instead of compiling
18
+ RUN pip install --no-cache-dir \
19
+ https://www.piwheels.org/simple/dlib/dlib-19.24.6-cp311-cp311-linux_x86_64.whl
20
 
21
  # Set up user
22
  RUN useradd -m -u 1000 user