File size: 563 Bytes
9c0c449
73d1f29
fa66a83
9c0c449
fa66a83
 
9c0c449
 
fa66a83
9c0c449
 
e318340
9c0c449
 
fa66a83
9c0c449
 
 
 
58db2dc
fa66a83
9c0c449
351c942
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Use the official FastAPI image from Hugging Face
FROM python:3.10-slim

# Set the working directory inside the container
WORKDIR /app

# Copy the local code to the container
COPY . .

# Create a writable cache directory within /app
RUN mkdir -p /app/.cache && chmod -R 777 /app/.cache

# Install dependencies
RUN pip install -r requirements.txt

# Set the cache directory for Transformers
ENV TRANSFORMERS_CACHE /app/.cache

# Expose FastAPI port
EXPOSE 7860 

# Command to run the application
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]