Pavithiran commited on
Commit
f52c053
·
verified ·
1 Parent(s): 1c29ca1

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +31 -0
Dockerfile ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM nvidia/cuda:12.1.1-runtime-ubuntu22.04
2
+ ENV DEBIAN_FRONTEND=noninteractive
3
+
4
+ # Install system dependencies
5
+ RUN apt-get update && apt-get install -y \
6
+ python3 python3-pip git \
7
+ ffmpeg libsm6 libxext6 \
8
+ --no-install-recommends \
9
+ && apt-get clean \
10
+ && rm -rf /var/lib/apt/lists/*
11
+
12
+ # Create a working directory
13
+ WORKDIR /app
14
+
15
+ # Copy requirements and install dependencies
16
+ COPY requirements.txt .
17
+ RUN pip3 install --no-cache-dir -r requirements.txt
18
+
19
+ # Copy the application code
20
+ COPY app.py .
21
+
22
+ # Set environment variables
23
+ ENV PYTHONUNBUFFERED=1
24
+ ENV GRADIO_SERVER_NAME=0.0.0.0
25
+ ENV GRADIO_SERVER_PORT=7860
26
+
27
+ # Expose the port
28
+ EXPOSE 7860
29
+
30
+ # Command to run the application
31
+ CMD ["python3", "app.py"]