zerovic commited on
Commit
7817555
·
verified ·
1 Parent(s): b7e3ec4

Create .dockerfile

Browse files
Files changed (1) hide show
  1. .dockerfile +25 -0
.dockerfile ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use a lightweight Python image
2
+ FROM python:3.10-slim
3
+
4
+ # Install system dependencies for OpenVINO and OpenCV
5
+ RUN apt-get update && apt-get install -y \
6
+ libgl1-mesa-glx \
7
+ libglib2.0-0 \
8
+ git \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+ # Set working directory
12
+ WORKDIR /app
13
+
14
+ # Clone the FastSD CPU repository
15
+ RUN git clone https://github.com/rupeshs/fastsdcpu.git .
16
+
17
+ # Install dependencies
18
+ RUN pip install --no-cache-dir -r requirements.txt
19
+ RUN pip install --no-cache-dir openvino-dev
20
+
21
+ # Hugging Face Spaces run on port 7860
22
+ EXPOSE 7860
23
+
24
+ # Command to start the web UI in server mode
25
+ CMD ["python3", "src/app.py", "--host", "0.0.0.0", "--port", "7860"]