File size: 733 Bytes
3642cca
9712cc8
f81743c
 
434ebe1
3642cca
f81743c
434ebe1
 
ec2d89c
 
 
 
994629b
ec2d89c
994629b
f81743c
 
 
434ebe1
f81743c
 
434ebe1
f81743c
434ebe1
 
f81743c
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29


# Use an official Python runtime as a parent image
FROM python:3.11-slim


# Set the working directory in the container
WORKDIR /app

ENV HF_HOME=/data/hf_cache
ENV TRANSFORMERS_CACHE=/data/hf_cache/transformers
ENV HF_DATASETS_CACHE=/data/hf_cache/datasets
ENV HF_HUB_CACHE=/data/hf_cache/hub

RUN mkdir -p /data/hf_cache/transformers /data/hf_cache/datasets /data/hf_cache/hub && chmod -R 777 /data/hf_cache

# Copy requirements.txt and install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy the rest of your app's code
COPY . .

# Expose the port Streamlit runs on
EXPOSE 8501

# Run Streamlit
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]