Bodyless commited on
Commit
ab7de11
·
verified ·
1 Parent(s): e5d7d6f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -9
Dockerfile CHANGED
@@ -1,5 +1,5 @@
1
- # 1. Use an official PyTorch base image
2
- FROM nvcr.io/nvidia/pytorch:23.09-py3
3
 
4
  # Set working directory inside the container
5
  WORKDIR /app
@@ -12,16 +12,12 @@ RUN apt-get update && apt-get install -y \
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
  # ----------------------------------------------------------------------
15
- # CRITICAL FIX 1: Single, aggressive install step
16
- # We rely on the base image for PyTorch and force all requirements
17
- # including the pinned NumPy, to be installed in one go.
18
  # ----------------------------------------------------------------------
19
 
 
20
  COPY requirements.txt ./
21
- # The --upgrade and --force-reinstall flags fix fragmentation errors
22
- RUN pip install --no-cache-dir --upgrade --force-reinstall -r requirements.txt
23
-
24
- # ----------------------------------------------------------------------
25
 
26
  # CRITICAL FIX 2: Download the spaCy language model data
27
  RUN python3 -m spacy download en_core_web_sm
 
1
+ # 1. FINAL BASE IMAGE: Use the official, stable PyTorch image
2
+ FROM pytorch/pytorch:2.0.1-cuda11.7-cudnn8-runtime
3
 
4
  # Set working directory inside the container
5
  WORKDIR /app
 
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
  # ----------------------------------------------------------------------
15
+ # CRITICAL FIX: Install dependencies in the correct order
 
 
16
  # ----------------------------------------------------------------------
17
 
18
+ # Install all Python packages (including pinned NumPy, which is necessary for spaCy)
19
  COPY requirements.txt ./
20
+ RUN pip install --no-cache-dir -r requirements.txt
 
 
 
21
 
22
  # CRITICAL FIX 2: Download the spaCy language model data
23
  RUN python3 -m spacy download en_core_web_sm