Update Dockerfile
Browse files- Dockerfile +15 -22
Dockerfile
CHANGED
|
@@ -1,26 +1,19 @@
|
|
| 1 |
-
FROM python:3.
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
RUN apt-get update && apt-get install -y \
|
| 7 |
-
build-essential \
|
| 8 |
-
libpq-dev \
|
| 9 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
-
|
| 11 |
-
# Set working directory
|
| 12 |
-
WORKDIR /home/user/app
|
| 13 |
-
|
| 14 |
-
# Copy your code
|
| 15 |
COPY . .
|
|
|
|
|
|
|
| 16 |
|
| 17 |
-
|
| 18 |
-
RUN pip install --no-cache-dir --upgrade pip
|
| 19 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
| 20 |
|
| 21 |
-
|
| 22 |
-
|
|
|
|
|
|
|
| 23 |
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
|
|
|
| 1 |
+
FROM python:3.11-slim
|
| 2 |
+
WORKDIR /app
|
| 3 |
+
COPY requirements.txt .
|
| 4 |
+
RUN pip install --no-cache-dir -r requirements.txt \
|
| 5 |
+
streamlit==1.44.1 "uvicorn>=0.14.0" "websockets>=10.4"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
COPY . .
|
| 7 |
+
CMD ["streamlit", "run", "app.py", "--server.port=7860"]
|
| 8 |
+
```
|
| 9 |
|
| 10 |
+
**Option 2: Pin spaCy to a version with Python 3.13 wheels**
|
|
|
|
|
|
|
| 11 |
|
| 12 |
+
In your `requirements.txt`, replace your current spaCy line with:
|
| 13 |
+
```
|
| 14 |
+
spacy==3.8.3
|
| 15 |
+
```
|
| 16 |
|
| 17 |
+
And also pin `thinc` explicitly:
|
| 18 |
+
```
|
| 19 |
+
thinc==8.3.4
|