File size: 443 Bytes
7e405ea
 
698aea0
7e405ea
 
698aea0
7e405ea
 
698aea0
7e405ea
 
698aea0
7e405ea
 
698aea0
7e405ea
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Use a lightweight PyTorch image with GPU support
FROM pytorch/pytorch:2.0.0-cuda11.7-cudnn8-runtime

# Set the working directory
WORKDIR /app

# Copy the application files into the container
COPY . /app

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

# Expose the FastAPI port
EXPOSE 7860

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