DerYur commited on
Commit
8057e94
·
verified ·
1 Parent(s): 6c1e825

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +26 -0
Dockerfile ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use Python base image
2
+ FROM python:3.10-slim
3
+
4
+ # Set working directory
5
+ WORKDIR /app
6
+
7
+ # Install OS-level dependencies
8
+ RUN apt-get update && apt-get install -y \
9
+ git \
10
+ gcc \
11
+ ffmpeg \
12
+ libsndfile1 \
13
+ libportaudio2 \
14
+ && rm -rf /var/lib/apt/lists/*
15
+
16
+ # Copy app code
17
+ COPY . .
18
+
19
+ # Install Python dependencies
20
+ RUN pip install --no-cache-dir -r requirements.txt
21
+
22
+ # Expose the FastAPI port
23
+ EXPOSE 7860
24
+
25
+ # Start FastAPI with uvicorn (your app must define: app = FastAPI())
26
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]