Lucii1 commited on
Commit
7157810
·
1 Parent(s): 8aeb9ae

upload docker file

Browse files
Files changed (2) hide show
  1. Dockerfile +22 -0
  2. README.md +10 -0
Dockerfile ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM pytorch/pytorch:2.2.0-cuda12.1-cudnn8-runtime
2
+
3
+ # Install necessary OS packages for OpenCV
4
+ RUN apt-get update && apt-get install -y \
5
+ git \
6
+ libgl1 \
7
+ libglib2.0-0 \
8
+ && rm -rf /var/lib/apt/lists/*
9
+
10
+ # Set working directory
11
+ WORKDIR /app
12
+
13
+ # Install Python dependencies
14
+ COPY requirements.txt .
15
+ RUN pip install --no-cache-dir -r requirements.txt
16
+
17
+ # Copy all source code
18
+ COPY . .
19
+
20
+ # Default run command
21
+ CMD ["uvicorn", "api_server:app", "--host", "0.0.0.0", "--port", "7860"]
22
+
README.md ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: AIDetect
3
+ emoji: 🏃
4
+ colorFrom: purple
5
+ colorTo: purple
6
+ sdk: docker
7
+ pinned: false
8
+ ---
9
+
10
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference