File size: 430 Bytes
51a8151
0affbc3
51a8151
 
0affbc3
51a8151
 
0affbc3
51a8151
 
 
 
 
 
0affbc3
51a8151
 
 
 
0affbc3
51a8151
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM python:3.10

# Set working directory
WORKDIR /app

# Copy local files
COPY . .

# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Set Hugging Face cache directory to writable one
ENV HF_HOME=/data
RUN mkdir -p /data && chmod 777 /data

# Expose the port
EXPOSE 7860

# Run the FastAPI app with Uvicorn
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]