tejani commited on
Commit
06f23f8
·
verified ·
1 Parent(s): 1cb4f93

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +28 -0
Dockerfile ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9
2
+
3
+ # Create non-root user
4
+ RUN useradd -m -u 1000 user
5
+ USER user
6
+ ENV PATH="/home/user/.local/bin:$PATH"
7
+
8
+ # Set working directory
9
+ WORKDIR /app
10
+
11
+ # Install system dependencies
12
+ RUN apt-get update && apt-get install -y \
13
+ git \
14
+ libgl1-mesa-glx \
15
+ libglib2.0-0 \
16
+ && rm -rf /var/lib/apt/lists/*
17
+
18
+ # Clone the FastSD CPU repository
19
+ RUN git clone https://github.com/rupeshs/fastsdcpu.git .
20
+
21
+ # Install Python dependencies
22
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
23
+
24
+ # Expose port for FastAPI server
25
+ EXPOSE 8000
26
+
27
+ # Command to run the FastAPI server
28
+ CMD ["python", "src/app.py", "--api"]