omm7 commited on
Commit
a959b9d
·
verified ·
1 Parent(s): f963b86

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -0
Dockerfile ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9-slim
2
+
3
+ # Set the working directory inside the container to /app
4
+ WORKDIR /app
5
+
6
+ # --- FIX: Set Hugging Face cache location to a writable directory (/tmp) ---
7
+ ENV HF_HOME="/tmp/hf_cache"
8
+ # --- Also setting standard Streamlit ENV variables ---
9
+ ENV STREAMLIT_SERVER_PORT=7860 \
10
+ STREAMLIT_SERVER_ADDRESS=0.0.0.0 \
11
+ STREAMLIT_BROWSER_GATHER_USAGE_STATS=false \
12
+ STREAMLIT_GLOBAL_DIR="/tmp/streamlit_global"
13
+
14
+ # Copy all files from the current directory on the host to the container's /app directory
15
+ COPY . .
16
+
17
+ # Install Python dependencies listed in requirements.txt
18
+ RUN pip3 install -r requirements.txt
19
+
20
+ # Define the command to run the Streamlit app
21
+ CMD ["streamlit", "run", "app.py"]