Factor Studios commited on
Commit
789f706
·
verified ·
1 Parent(s): eca4b9a

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +32 -0
Dockerfile ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use official Python base image
2
+ FROM python:3.10-slim
3
+
4
+ # Set environment variables
5
+ ENV PYTHONDONTWRITEBYTECODE=1
6
+ ENV PYTHONUNBUFFERED=1
7
+
8
+ # Create app directory
9
+ WORKDIR /app
10
+
11
+ # Install system dependencies
12
+ RUN apt-get update && apt-get install -y \
13
+ curl \
14
+ && rm -rf /var/lib/apt/lists/*
15
+
16
+ # Copy requirements and install Python packages
17
+ COPY requirements.txt .
18
+ RUN pip install --no-cache-dir -r requirements.txt
19
+
20
+ # Copy the rest of the code
21
+ COPY . .
22
+
23
+ # Make everything in /app world-writable
24
+ RUN chmod -R 777 /app
25
+
26
+ # Ensure /tmp is writable too (common scratch space)
27
+ RUN chmod -R 777 /tmp
28
+
29
+ # Default command to run the script (change as needed)
30
+ EXPOSE 8000
31
+
32
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]