trixy194t commited on
Commit
4493832
·
verified ·
1 Parent(s): 3352449

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -0
Dockerfile ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use a lightweight Python image
2
+ FROM python:3.9-slim
3
+
4
+ # Set the working directory inside the container
5
+ WORKDIR /code
6
+
7
+ # Install system dependencies required for librosa and audio processing
8
+ RUN apt-get update && apt-get install -y \
9
+ libsndfile1 \
10
+ ffmpeg \
11
+ && rm -rf /var/lib/apt/lists/*
12
+
13
+ # Copy requirements and install Python libraries
14
+ COPY ./requirements.txt /code/requirements.txt
15
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
16
+
17
+ # Copy the rest of your application code
18
+ COPY . .
19
+
20
+ # Command to run the FastAPI app on port 7860
21
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]