drrobot9 commited on
Commit
7748a75
·
verified ·
1 Parent(s): 691a081

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +37 -0
Dockerfile CHANGED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim-bookworm
2
+
3
+ ENV DEBIAN_FRONTEND=noninteractive \
4
+ PYTHONUNBUFFERED=1 \
5
+ PYTHONDONTWRITEBYTECODE=1 \
6
+ PIP_NO_CACHE_DIR=1
7
+
8
+ WORKDIR /code
9
+
10
+ # Install system dependencies for audio processing
11
+ RUN apt-get update && apt-get install -y --no-install-recommends \
12
+ git \
13
+ wget \
14
+ curl \
15
+ ffmpeg \
16
+ libsndfile1 \
17
+ gcc \
18
+ g++ \
19
+ build-essential \
20
+ python3-dev \
21
+ pkg-config \
22
+ portaudio19-dev \
23
+ && apt-get clean && rm -rf /var/lib/apt/lists/*
24
+
25
+ # Copy and install Python dependencies
26
+ COPY requirements.txt .
27
+ RUN pip install --upgrade pip \
28
+ && pip install --no-cache-dir -r requirements.txt
29
+
30
+ # Copy the entire application
31
+ COPY . .
32
+
33
+ # Expose the port Hugging Face expects
34
+ EXPOSE 7860
35
+
36
+ # Run with your app structure (new_app.new_main)
37
+ CMD ["uvicorn", "new_app.new_main:app", "--host", "0.0.0.0", "--port", "7860"]