Spaces:
Running
Running
Asish Karthikeya Gogineni commited on
Commit ·
82387e1
1
Parent(s): b4da4fc
fix: Update Dockerfile for Hugging Face /tmp directories and env vars
Browse files- Dockerfile +9 -2
Dockerfile
CHANGED
|
@@ -15,11 +15,18 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
| 15 |
# Copy application code
|
| 16 |
COPY . .
|
| 17 |
|
| 18 |
-
# Create
|
| 19 |
-
RUN mkdir -p data chroma_db
|
| 20 |
|
| 21 |
# Expose Streamlit port
|
| 22 |
EXPOSE 7860
|
| 23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
# Run Streamlit
|
| 25 |
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]
|
|
|
|
| 15 |
# Copy application code
|
| 16 |
COPY . .
|
| 17 |
|
| 18 |
+
# Create writable directories in /tmp (Hugging Face only allows writes to /tmp)
|
| 19 |
+
RUN mkdir -p /tmp/data /tmp/chroma_db /tmp/code_chatbot_extracted
|
| 20 |
|
| 21 |
# Expose Streamlit port
|
| 22 |
EXPOSE 7860
|
| 23 |
|
| 24 |
+
# Environment variables for Hugging Face Spaces
|
| 25 |
+
# Note: Actual API keys should be set in Hugging Face Space Secrets, not here
|
| 26 |
+
ENV STREAMLIT_SERVER_PORT=7860
|
| 27 |
+
ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0
|
| 28 |
+
ENV STREAMLIT_SERVER_HEADLESS=true
|
| 29 |
+
ENV STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
|
| 30 |
+
|
| 31 |
# Run Streamlit
|
| 32 |
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]
|