Sunnycodes3114 commited on
Commit
51ddad0
·
verified ·
1 Parent(s): 3f2a38a

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +32 -0
Dockerfile ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use Python base image
2
+ FROM python:3.10-slim
3
+
4
+ # Install system dependencies
5
+ RUN apt-get update && apt-get install -y \
6
+ git \
7
+ ffmpeg \
8
+ libsm6 \
9
+ libxext6 \
10
+ cmake \
11
+ libgl1-mesa-glx \
12
+ && rm -rf /var/lib/apt/lists/*
13
+
14
+ # Install pip and essential Python libraries
15
+ RUN pip install --no-cache-dir \
16
+ torch==1.13.1+cpu \
17
+ torchvision==0.14.1+cpu \
18
+ git+https://github.com/facebookresearch/detectron2.git \
19
+ gradio \
20
+ requests \
21
+ opencv-python \
22
+ Pillow \
23
+ numpy
24
+
25
+ # Set the working directory
26
+ WORKDIR /app
27
+
28
+ # Copy the application code
29
+ COPY . .
30
+
31
+ # Set the entry point for the container
32
+ CMD ["python", "app.py"]