fffiloni commited on
Commit
ac9715e
·
verified ·
1 Parent(s): d8105f0

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -10
Dockerfile CHANGED
@@ -1,20 +1,28 @@
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 prerequisites and add PPA for Python 3.11
7
- RUN apt-get update && apt-get install -y software-properties-common && \
8
- add-apt-repository -y ppa:deadsnakes/ppa && \
9
- apt-get update && apt-get install -y \
10
- python3.11 python3.11-dev python3.11-venv python3.11-distutils python3-pip && \
11
- update-alternatives --install /usr/bin/python python /usr/bin/python3.11 1 && \
12
- update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1
13
 
14
  # Verify Python version
15
  RUN python --version
16
 
17
- # Install a compatible dlib wheel
 
 
 
 
 
 
 
 
18
  RUN pip install --no-cache-dir \
19
  https://www.wheelodex.org/projects/dlib-bin/wheels/dlib_bin-19.24.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
20
 
 
1
+ # Use Ubuntu 22.04 as base (Python 3.11 is default)
2
+ FROM ubuntu:22.04
3
 
4
  ENV DEBIAN_FRONTEND=noninteractive
5
 
6
+ # Install system dependencies
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
  # Verify Python version
15
  RUN python --version
16
 
17
+ # Install CUDA and cuDNN (for PyTorch)
18
+ RUN apt-get install -y \
19
+ cuda-11-8 \
20
+ libcudnn8=8.9.2.26-1+cuda11.8
21
+
22
+ # Install PyTorch (CUDA 11.8)
23
+ RUN pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
24
+
25
+ # Install a compatible dlib wheel (manylinux_x86_64)
26
  RUN pip install --no-cache-dir \
27
  https://www.wheelodex.org/projects/dlib-bin/wheels/dlib_bin-19.24.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
28