Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +6 -1
Dockerfile
CHANGED
|
@@ -22,6 +22,9 @@ RUN apt-get update && apt-get install -y \
|
|
| 22 |
# Set working directory
|
| 23 |
WORKDIR /app
|
| 24 |
|
|
|
|
|
|
|
|
|
|
| 25 |
# Copy application files
|
| 26 |
COPY . /app
|
| 27 |
|
|
@@ -35,6 +38,8 @@ ENV CHROMIUM_PATH=/usr/bin/chromium
|
|
| 35 |
ENV DISPLAY=:99
|
| 36 |
ENV PYTHONUNBUFFERED=1
|
| 37 |
ENV STREAMLIT_OPT_OUT_OF_USAGE_STATISTICS=true
|
|
|
|
|
|
|
| 38 |
|
| 39 |
# Ensure ChromeDriver and Chromium are executable
|
| 40 |
RUN chmod +x /usr/bin/chromedriver /usr/bin/chromium
|
|
@@ -43,4 +48,4 @@ RUN chmod +x /usr/bin/chromedriver /usr/bin/chromium
|
|
| 43 |
EXPOSE 8501
|
| 44 |
|
| 45 |
# Run Streamlit with headless mode and disabled file watcher
|
| 46 |
-
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.fileWatcherType=none", "--server.headless=true"]
|
|
|
|
| 22 |
# Set working directory
|
| 23 |
WORKDIR /app
|
| 24 |
|
| 25 |
+
# Create cache directory for Hugging Face
|
| 26 |
+
RUN mkdir -p /app/cache && chmod -R 777 /app/cache
|
| 27 |
+
|
| 28 |
# Copy application files
|
| 29 |
COPY . /app
|
| 30 |
|
|
|
|
| 38 |
ENV DISPLAY=:99
|
| 39 |
ENV PYTHONUNBUFFERED=1
|
| 40 |
ENV STREAMLIT_OPT_OUT_OF_USAGE_STATISTICS=true
|
| 41 |
+
ENV TRANSFORMERS_CACHE=/app/cache
|
| 42 |
+
ENV HF_HOME=/app/cache
|
| 43 |
|
| 44 |
# Ensure ChromeDriver and Chromium are executable
|
| 45 |
RUN chmod +x /usr/bin/chromedriver /usr/bin/chromium
|
|
|
|
| 48 |
EXPOSE 8501
|
| 49 |
|
| 50 |
# Run Streamlit with headless mode and disabled file watcher
|
| 51 |
+
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.fileWatcherType=none", "--server.headless=true"]
|