File size: 615 Bytes
aa4117e
 
 
 
 
 
 
 
 
 
 
 
9ec0328
aa4117e
 
 
 
 
 
 
 
 
 
 
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
# Use an official PyTorch GPU-enabled image (with CUDA 11.7 and cuDNN8)
FROM pytorch/pytorch:2.0.1-cuda11.7-cudnn8-runtime

# Set environment variables to avoid buffering issues
ENV PYTHONUNBUFFERED=1

# Install system dependencies
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*

# Set the working directory
WORKDIR /app

# Copy requirements.txt and install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy the application code
COPY app.py .

# Expose the default Gradio port
EXPOSE 7860

# Command to run the app
CMD ["python", "app.py"]