tommytracx commited on
Commit
e05df0a
·
verified ·
1 Parent(s): cbfa8a5

Create Dockerfile

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