sksameermujahid commited on
Commit
280956d
·
verified ·
1 Parent(s): 115947b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -3
Dockerfile CHANGED
@@ -11,7 +11,8 @@ RUN mkdir -p /cache && \
11
  # Set cache environment variables
12
  ENV TRANSFORMERS_CACHE=/cache \
13
  HF_HOME=/cache \
14
- XDG_CACHE_HOME=/cache
 
15
 
16
  # Install system dependencies
17
  RUN apt-get update && apt-get install -y \
@@ -29,9 +30,10 @@ RUN apt-get update && apt-get install -y \
29
  # Copy requirements first to leverage Docker cache
30
  COPY ./requirements.txt /code/requirements.txt
31
 
32
- # Install Python packages
33
  RUN pip install --no-cache-dir --upgrade pip && \
34
- pip install --no-cache-dir --upgrade -r /code/requirements.txt
 
35
 
36
  # Copy the rest of the application
37
  COPY ./app.py /code/app.py
 
11
  # Set cache environment variables
12
  ENV TRANSFORMERS_CACHE=/cache \
13
  HF_HOME=/cache \
14
+ XDG_CACHE_HOME=/cache \
15
+ PYTHONPATH=/code
16
 
17
  # Install system dependencies
18
  RUN apt-get update && apt-get install -y \
 
30
  # Copy requirements first to leverage Docker cache
31
  COPY ./requirements.txt /code/requirements.txt
32
 
33
+ # Install Python packages in multiple steps to handle dependencies better
34
  RUN pip install --no-cache-dir --upgrade pip && \
35
+ pip install --no-cache-dir numpy>=1.25.0 && \
36
+ pip install --no-cache-dir -r /code/requirements.txt
37
 
38
  # Copy the rest of the application
39
  COPY ./app.py /code/app.py