mknolan commited on
Commit
b82f3af
·
verified ·
1 Parent(s): 96177e8

Copy from mknolan/internvl25-image-analyzer

Browse files
Files changed (1) hide show
  1. Dockerfile +34 -0
Dockerfile ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM nvidia/cuda:12.1.0-runtime-ubuntu22.04
2
+
3
+ # Set working directory
4
+ WORKDIR /app
5
+
6
+ # Install system dependencies
7
+ RUN apt-get update && apt-get install -y \
8
+ python3 \
9
+ python3-pip \
10
+ git \
11
+ ffmpeg \
12
+ libsm6 \
13
+ libxext6 \
14
+ && rm -rf /var/lib/apt/lists/*
15
+
16
+ # Upgrade pip
17
+ RUN python3 -m pip install --upgrade pip
18
+
19
+ # Copy requirements file
20
+ COPY requirements.txt .
21
+
22
+ # Install Python dependencies
23
+ RUN pip install --no-cache-dir -r requirements.txt
24
+
25
+ # Copy the rest of the application
26
+ COPY . .
27
+
28
+ # Set environment variables
29
+ ENV PYTHONPATH=/app
30
+ ENV PYTHONUNBUFFERED=1
31
+ ENV PORT=7860
32
+
33
+ # Set default command
34
+ CMD ["python3", "app.py"]