mohammedafeef commited on
Commit
d1a362b
·
verified ·
1 Parent(s): 9dcc4e8

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +27 -0
Dockerfile ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use Python 3.10 base image
2
+ FROM python:3.10-slim
3
+
4
+ # Set working directory
5
+ WORKDIR /app
6
+
7
+ # Install system dependencies for audio processing
8
+ RUN apt-get update && apt-get install -y \
9
+ ffmpeg \
10
+ libsndfile1 \
11
+ git \
12
+ && rm -rf /var/lib/apt/lists/*
13
+
14
+ # Copy requirements first for better caching
15
+ COPY requirements.txt .
16
+
17
+ # Install Python dependencies
18
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
19
+
20
+ # Copy all application files
21
+ COPY . .
22
+
23
+ # Expose port 7860 (Hugging Face Spaces default)
24
+ EXPOSE 7860
25
+
26
+ # Run the FastAPI server on port 7860
27
+ CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]