File size: 703 Bytes
a959b9d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FROM python:3.9-slim

# Set the working directory inside the container to /app
WORKDIR /app

# --- FIX: Set Hugging Face cache location to a writable directory (/tmp) ---
ENV HF_HOME="/tmp/hf_cache" 
# --- Also setting standard Streamlit ENV variables ---
ENV STREAMLIT_SERVER_PORT=7860 \
    STREAMLIT_SERVER_ADDRESS=0.0.0.0 \
    STREAMLIT_BROWSER_GATHER_USAGE_STATS=false \
    STREAMLIT_GLOBAL_DIR="/tmp/streamlit_global" 

# Copy all files from the current directory on the host to the container's /app directory
COPY . .

# Install Python dependencies listed in requirements.txt
RUN pip3 install -r requirements.txt

# Define the command to run the Streamlit app
CMD ["streamlit", "run", "app.py"]