mike23415 commited on
Commit
9a25e9a
·
verified ·
1 Parent(s): d10798f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -4
Dockerfile CHANGED
@@ -1,13 +1,15 @@
1
  FROM python:3.9-slim
2
 
3
- # System dependencies
4
  RUN apt-get update && apt-get install -y \
5
  git \
6
  gcc \
7
  g++ \
 
 
8
  && rm -rf /var/lib/apt/lists/*
9
 
10
- # Create writable cache directory
11
  RUN mkdir -p /app/cache && chmod 777 /app/cache
12
 
13
  WORKDIR /app
@@ -15,12 +17,16 @@ WORKDIR /app
15
  # Environment variables
16
  ENV TRANSFORMERS_CACHE=/app/cache \
17
  HF_HOME=/app/cache \
18
- NUMBA_CACHE_DIR=/app/cache \
19
  PYTHONWARNINGS="ignore" \
 
20
  XDG_CACHE_HOME=/app/cache
21
 
22
  COPY requirements.txt .
23
- RUN pip install --no-cache-dir -r requirements.txt
 
 
 
 
24
 
25
  COPY app.py .
26
 
 
1
  FROM python:3.9-slim
2
 
3
+ # System dependencies with numpy build requirements
4
  RUN apt-get update && apt-get install -y \
5
  git \
6
  gcc \
7
  g++ \
8
+ libopenblas-dev \
9
+ python3-dev \
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
+ # Create cache directory
13
  RUN mkdir -p /app/cache && chmod 777 /app/cache
14
 
15
  WORKDIR /app
 
17
  # Environment variables
18
  ENV TRANSFORMERS_CACHE=/app/cache \
19
  HF_HOME=/app/cache \
 
20
  PYTHONWARNINGS="ignore" \
21
+ NPY_NO_DEPRECATED_API=1 \
22
  XDG_CACHE_HOME=/app/cache
23
 
24
  COPY requirements.txt .
25
+
26
+ # Install with numpy first
27
+ RUN pip install --no-cache-dir --upgrade pip && \
28
+ pip install --no-cache-dir numpy==1.26.4 && \
29
+ pip install --no-cache-dir -r requirements.txt
30
 
31
  COPY app.py .
32