Update Dockerfile
Browse files- Dockerfile +20 -0
Dockerfile
CHANGED
|
@@ -1,2 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
ENV STREAMLIT_HOME=/app/.streamlit
|
| 2 |
ENV TRANSFORMERS_CACHE=/app/.cache/huggingface/hub
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Base image
|
| 2 |
+
FROM python:3.9-slim
|
| 3 |
+
|
| 4 |
+
# Set working directory
|
| 5 |
+
WORKDIR /app
|
| 6 |
+
|
| 7 |
+
# Set environment variables for Streamlit and Hugging Face
|
| 8 |
ENV STREAMLIT_HOME=/app/.streamlit
|
| 9 |
ENV TRANSFORMERS_CACHE=/app/.cache/huggingface/hub
|
| 10 |
+
|
| 11 |
+
# Install dependencies
|
| 12 |
+
COPY requirements.txt .
|
| 13 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 14 |
+
|
| 15 |
+
# Copy the app code
|
| 16 |
+
COPY . .
|
| 17 |
+
|
| 18 |
+
# Expose Streamlit port
|
| 19 |
+
EXPOSE 8501
|
| 20 |
+
|
| 21 |
+
# Run the app
|
| 22 |
+
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|