triflix commited on
Commit
4e2601e
·
verified ·
1 Parent(s): b92770b

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +33 -0
Dockerfile ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM 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
+ wget \
9
+ build-essential \
10
+ && rm -rf /var/lib/apt/lists/*
11
+
12
+ # Copy requirements first for better caching
13
+ COPY requirements.txt .
14
+
15
+ # Install Python dependencies with specific numpy version
16
+ RUN pip install --no-cache-dir numpy==1.26.4
17
+ RUN pip install --no-cache-dir -r requirements.txt
18
+
19
+ # Copy application files
20
+ COPY app.py .
21
+
22
+ # Create necessary directories
23
+ RUN mkdir -p voices outputs
24
+
25
+ # Expose port for Gradio
26
+ EXPOSE 7860
27
+
28
+ # Set environment variables
29
+ ENV GRADIO_SERVER_NAME="0.0.0.0"
30
+ ENV GRADIO_SERVER_PORT="7860"
31
+
32
+ # Run the application
33
+ CMD ["python", "app.py"]