File size: 537 Bytes
d769fbc
2640b8d
d769fbc
a1eb3aa
 
 
 
 
 
d769fbc
 
 
 
 
 
 
 
 
 
 
 
 
686beef
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Use a lightweight Python image
FROM python:3.10-slim

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

# Set environment variable for cache
ENV CACHE_DIR=/app/cache

# Set the working directory in the container
WORKDIR /app

# Copy the API code and dependencies
COPY . /app

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

# Expose the API port
EXPOSE 8000

# Run the FastAPI server with Uvicorn
CMD ["uvicorn", "fast:app", "--host", "0.0.0.0", "--port", "8000"]