tezuesh commited on
Commit
4091af9
·
verified ·
1 Parent(s): f1490e9

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -16
Dockerfile CHANGED
@@ -1,5 +1,7 @@
1
  # Builder stage
2
- FROM nvidia/cuda:12.1.0-cudnn8-devel-ubuntu22.04 as builder
 
 
3
 
4
  # System-level configuration
5
  ENV DEBIAN_FRONTEND=noninteractive \
@@ -14,18 +16,11 @@ ENV DEBIAN_FRONTEND=noninteractive \
14
 
15
  # Install build dependencies
16
  RUN apt-get update && apt-get install -y --no-install-recommends \
17
- build-essential \
18
- python3-dev \
19
  python3-pip \
20
- git \
21
- ffmpeg \
22
- libsndfile1 \
23
- curl \
24
- ninja-build \
25
  && apt-get clean \
26
  && rm -rf /var/lib/apt/lists/* \
27
- && rm -rf /var/cache/apt/archives/* \
28
- && rm -rf /root/.cache/*
29
 
30
  # Set up Python
31
  RUN ln -sf /usr/bin/python3 /usr/bin/python && \
@@ -33,12 +28,8 @@ RUN ln -sf /usr/bin/python3 /usr/bin/python && \
33
  python3 -m pip install --no-cache-dir pip==23.3.1 setuptools==69.0.3 wheel==0.42.0 && \
34
  rm -rf /root/.cache/pip/*
35
 
36
- # Install PyTorch with CUDA support
37
- RUN pip3 install --no-cache-dir \
38
- torch==2.1.2 \
39
- torchaudio==2.1.2 \
40
- torchvision==0.16.2 \
41
- --extra-index-url https://download.pytorch.org/whl/cu121 && \
42
  rm -rf /root/.cache/pip/* && \
43
  find /usr/local/lib/python3.* -name '*.pyc' -delete && \
44
  find /usr/local/lib/python3.* -name '__pycache__' -exec rm -r {} +
 
1
  # Builder stage
2
+ FROM nvidia/cuda:12.1.0-cudnn8-runtime-ubuntu22.04
3
+
4
+ # Add these lines after the FROM statement
5
 
6
  # System-level configuration
7
  ENV DEBIAN_FRONTEND=noninteractive \
 
16
 
17
  # Install build dependencies
18
  RUN apt-get update && apt-get install -y --no-install-recommends \
 
 
19
  python3-pip \
 
 
 
 
 
20
  && apt-get clean \
21
  && rm -rf /var/lib/apt/lists/* \
22
+ && python3 -m pip install --no-cache-dir --upgrade pip
23
+
24
 
25
  # Set up Python
26
  RUN ln -sf /usr/bin/python3 /usr/bin/python && \
 
28
  python3 -m pip install --no-cache-dir pip==23.3.1 setuptools==69.0.3 wheel==0.42.0 && \
29
  rm -rf /root/.cache/pip/*
30
 
31
+ # Replace the pip install command (around line 80) with:
32
+ RUN python3 -m pip install --no-cache-dir -r requirements.txt && \
 
 
 
 
33
  rm -rf /root/.cache/pip/* && \
34
  find /usr/local/lib/python3.* -name '*.pyc' -delete && \
35
  find /usr/local/lib/python3.* -name '__pycache__' -exec rm -r {} +