Upload Dockerfile with huggingface_hub
Browse files- Dockerfile +19 -0
Dockerfile
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use a slim version of Python to save space
|
| 2 |
+
FROM python:3.9-slim
|
| 3 |
+
|
| 4 |
+
# Set working directory
|
| 5 |
+
WORKDIR /app
|
| 6 |
+
|
| 7 |
+
# Copy files
|
| 8 |
+
COPY . /app
|
| 9 |
+
|
| 10 |
+
# CRITICAL FIX: --no-cache-dir prevents OOM (Out of Memory) crashes
|
| 11 |
+
# We also upgrade pip first to ensure compatibility
|
| 12 |
+
RUN pip install --no-cache-dir --upgrade pip && \
|
| 13 |
+
pip install --no-cache-dir --upgrade -r requirements.txt
|
| 14 |
+
|
| 15 |
+
# Expose the port
|
| 16 |
+
EXPOSE 8501
|
| 17 |
+
|
| 18 |
+
# Run the app
|
| 19 |
+
CMD ["streamlit", "run", "app.py", "--server.address=0.0.0.0", "--server.port=7860"]
|