File size: 598 Bytes
d75b820
 
 
 
 
 
 
 
 
 
 
 
288d5ce
 
 
221f4db
 
 
d75b820
 
 
 
 
 
 
 
5e9b3af
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
FROM python:3.13-slim

# Set the working directory
WORKDIR /app

RUN apt-get update && apt-get install -y build-essential

# Update pip to the latest version
RUN pip install --upgrade pip

RUN pip install -U setuptools wheel

# Install torch
RUN pip install -U torch torchvision torchaudio

# Copy the requirements file into the container
COPY requirements.txt .

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

# Copy the rest of the application code into the container
COPY . .

EXPOSE 7860

ENTRYPOINT ["fastapi", "run", "main.py", "--host=0.0.0.0", "--port=7860"]