Prabin1 commited on
Commit
ccc1b51
·
verified ·
1 Parent(s): 148368a

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +28 -0
Dockerfile ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Python runtime as a parent image
2
+ FROM python:3.9-slim
3
+
4
+ # Set the working directory in the container
5
+ WORKDIR /app
6
+
7
+ # Install system dependencies required by librosa and soundfile
8
+ # ffmpeg is included for broader audio format compatibility
9
+ RUN apt-get update && apt-get install -y \
10
+ libsndfile1 \
11
+ ffmpeg \
12
+ && rm -rf /var/lib/apt/lists/*
13
+
14
+ # Copy the requirements file into the container
15
+ COPY requirements.txt .
16
+
17
+ # Install any needed packages specified in requirements.txt
18
+ # Using --no-cache-dir reduces the image size
19
+ RUN pip install --no-cache-dir -r requirements.txt
20
+
21
+ # Copy the rest of the application code into the container
22
+ COPY . .
23
+
24
+ # Make port 7860 available to the world outside this container
25
+ EXPOSE 7860
26
+
27
+ # Run app.py when the container launches
28
+ CMD ["python", "app.py"]