dschandra commited on
Commit
31b518c
·
verified ·
1 Parent(s): 93a3e92

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +35 -0
Dockerfile ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # backend/Dockerfile
2
+ FROM python:3.10-slim
3
+
4
+ # Set working directory
5
+ WORKDIR /home/user/app
6
+
7
+ # Install system dependencies
8
+ RUN apt-get update && apt-get install -y \
9
+ ffmpeg \
10
+ libsm6 \
11
+ libxext6 \
12
+ libgl1-mesa-glx \
13
+ && rm -rf /var/lib/apt/lists/*
14
+
15
+ # Upgrade pip
16
+ RUN pip install --no-cache-dir --upgrade pip
17
+
18
+ # Copy requirements.txt and install Python dependencies
19
+ COPY requirements.txt .
20
+ RUN pip install --no-cache-dir -r requirements.txt
21
+
22
+ # Copy all application files
23
+ COPY . .
24
+
25
+ # Create directories for uploads and replays
26
+ RUN mkdir -p uploads replays
27
+
28
+ # Set environment variables (optional, can be overridden)
29
+ ENV PYTHONUNBUFFERED=1
30
+
31
+ # Expose port
32
+ EXPOSE 8000
33
+
34
+ # Run the application
35
+ CMD ["uvicorn", "backend.app:app", "--host", "0.0.0.0", "--port", "8000"]