sofieff commited on
Commit
aff6a8b
·
verified ·
1 Parent(s): 637c4d8

add Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +35 -0
Dockerfile ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ROM python:3.10-slim
2
+
3
+ # Set working directory
4
+ WORKDIR /app
5
+
6
+ # Install system dependencies
7
+ RUN apt-get update && apt-get install -y \
8
+ libsndfile1 \
9
+ libsndfile1-dev \
10
+ gcc \
11
+ g++ \
12
+ && rm -rf /var/lib/apt/lists/*
13
+
14
+ # Copy requirements first for better caching
15
+ COPY requirements_hf.txt .
16
+
17
+ # Install Python dependencies
18
+ RUN pip install --no-cache-dir -r requirements_hf.txt
19
+
20
+ # Copy application files
21
+ COPY . .
22
+
23
+ # Create necessary directories
24
+ RUN mkdir -p data sounds
25
+
26
+ # Set environment variables
27
+ ENV PYTHONPATH=/app
28
+ ENV GRADIO_SERVER_NAME=0.0.0.0
29
+ ENV GRADIO_SERVER_PORT=7860
30
+
31
+ # Expose port
32
+ EXPOSE 7860
33
+
34
+ # Run the application
35
+ CMD ["python", "app_hf.py"]