SeedOfEvil commited on
Commit
aa4117e
·
verified ·
1 Parent(s): 6cf4582

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -0
Dockerfile ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official PyTorch GPU-enabled image (with CUDA 11.7 and cuDNN8)
2
+ FROM pytorch/pytorch:2.0.1-cuda11.7-cudnn8-runtime
3
+
4
+ # Set environment variables to avoid buffering issues
5
+ ENV PYTHONUNBUFFERED=1
6
+
7
+ # Install system dependencies
8
+ RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
9
+
10
+ # Set the working directory
11
+ WORKDIR /app
12
+
13
+ # Copy requirements and install them
14
+ COPY requirements.txt .
15
+ RUN pip install --no-cache-dir -r requirements.txt
16
+
17
+ # Copy the application code
18
+ COPY app.py .
19
+
20
+ # Expose the default Gradio port
21
+ EXPOSE 7860
22
+
23
+ # Command to run the app
24
+ CMD ["python", "app.py"]