wjbmattingly commited on
Commit
1b4b5a0
·
verified ·
1 Parent(s): b52e500

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -2
Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- FROM python:3.9-slim
2
 
3
  WORKDIR /app
4
 
@@ -9,9 +9,14 @@ RUN apt-get update && apt-get install -y \
9
  build-essential \
10
  && rm -rf /var/lib/apt/lists/*
11
 
 
 
 
12
  # Copy requirements and install dependencies
13
  COPY requirements.txt .
14
- RUN pip install --no-cache-dir -r requirements.txt
 
 
15
 
16
  # Download spaCy model
17
  RUN python -m spacy download en_core_web_sm
 
1
+ FROM python:3.10
2
 
3
  WORKDIR /app
4
 
 
9
  build-essential \
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
+ # Upgrade pip and install wheel to use pre-compiled packages when possible
13
+ RUN pip install --upgrade pip wheel
14
+
15
  # Copy requirements and install dependencies
16
  COPY requirements.txt .
17
+
18
+ # Install packages with timeout and prefer binary wheels
19
+ RUN pip install --no-cache-dir --timeout 300 --prefer-binary -r requirements.txt
20
 
21
  # Download spaCy model
22
  RUN python -m spacy download en_core_web_sm