Spaces:
Runtime error
Runtime error
UPDATED DOCKER
Browse files- Dockerfile +13 -0
Dockerfile
CHANGED
|
@@ -2,10 +2,23 @@ FROM python:3.9-slim
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
COPY requirements.txt requirements.txt
|
| 6 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
| 7 |
COPY . .
|
| 8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
EXPOSE 5000
|
| 10 |
|
| 11 |
CMD ["python", "app.py"]
|
|
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
# Install dependencies
|
| 6 |
+
RUN apt-get update && apt-get install -y \
|
| 7 |
+
libgl1-mesa-glx \
|
| 8 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 9 |
+
|
| 10 |
COPY requirements.txt requirements.txt
|
| 11 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 12 |
+
|
| 13 |
COPY . .
|
| 14 |
|
| 15 |
+
# Set environment variables
|
| 16 |
+
ENV TRANSFORMERS_CACHE=/app/cache
|
| 17 |
+
ENV MPLCONFIGDIR=/app/matplotlib
|
| 18 |
+
|
| 19 |
+
# Create necessary directories
|
| 20 |
+
RUN mkdir -p /app/cache /app/matplotlib
|
| 21 |
+
|
| 22 |
EXPOSE 5000
|
| 23 |
|
| 24 |
CMD ["python", "app.py"]
|