File size: 887 Bytes
b49a99c
865e49b
b49a99c
38fe66f
 
 
 
52850f3
38fe66f
a7ce855
b49a99c
cb094fc
b49a99c
 
 
 
a7ce855
1f8af3e
b49a99c
 
 
 
 
 
38fe66f
b49a99c
 
2bf1180
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
28
# Use a base image with Python
FROM python:3.10-slim

# Install git and other build tools
# The specific command depends on the base image's package manager.
# For Debian/Ubuntu-based images like python:3.10-slim, it's apt-get.
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
RUN python3 -m pip install --upgrade pip


# Set the working directory in the container
ENV CUDA_HOME=/usr/local/cuda
WORKDIR /app

# Copy the requirements file and install dependencies
COPY requirements.txt .
RUN pip install torch==2.3.0
RUN pip install --no-cache-dir --upgrade setuptools wheel packaging
RUN pip install --no-cache-dir -r requirements.txt

# Copy the rest of your application code
COPY . .

# Expose the port your application will run on
EXPOSE 7860

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