Spaces:
Paused
Paused
Commit
·
80ee23b
1
Parent(s):
19f7a72
Files added
Browse files- Dockerfile +8 -6
- requirements.txt +1 -0
Dockerfile
CHANGED
|
@@ -1,6 +1,5 @@
|
|
| 1 |
# Use an official Python runtime as the base image
|
| 2 |
-
FROM python:3.
|
| 3 |
-
LABEL authors="muzammil"
|
| 4 |
|
| 5 |
# Set the working directory inside the container
|
| 6 |
WORKDIR /app
|
|
@@ -8,14 +7,17 @@ WORKDIR /app
|
|
| 8 |
# Set Hugging Face cache directory to /tmp/.cache (which should be writable)
|
| 9 |
ENV HF_HOME="/tmp/.cache"
|
| 10 |
|
|
|
|
|
|
|
|
|
|
| 11 |
# Copy the current directory contents into the container at /app
|
| 12 |
COPY . /app
|
| 13 |
|
| 14 |
-
# Install any required dependencies
|
| 15 |
-
RUN pip install -r requirements.txt
|
| 16 |
|
| 17 |
# Expose the port Flask will run on
|
| 18 |
EXPOSE 7860
|
| 19 |
|
| 20 |
-
# Command to run
|
| 21 |
-
CMD ["
|
|
|
|
| 1 |
# Use an official Python runtime as the base image
|
| 2 |
+
FROM python:3.9-slim
|
|
|
|
| 3 |
|
| 4 |
# Set the working directory inside the container
|
| 5 |
WORKDIR /app
|
|
|
|
| 7 |
# Set Hugging Face cache directory to /tmp/.cache (which should be writable)
|
| 8 |
ENV HF_HOME="/tmp/.cache"
|
| 9 |
|
| 10 |
+
# Install FFmpeg
|
| 11 |
+
RUN apt-get update && apt-get install -y ffmpeg
|
| 12 |
+
|
| 13 |
# Copy the current directory contents into the container at /app
|
| 14 |
COPY . /app
|
| 15 |
|
| 16 |
+
# Install any required Python dependencies
|
| 17 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 18 |
|
| 19 |
# Expose the port Flask will run on
|
| 20 |
EXPOSE 7860
|
| 21 |
|
| 22 |
+
# Command to run Gunicorn in production
|
| 23 |
+
CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:7860", "app:app"]
|
requirements.txt
CHANGED
|
@@ -6,4 +6,5 @@ transformers
|
|
| 6 |
pydub
|
| 7 |
Levenshtein
|
| 8 |
Werkzeug
|
|
|
|
| 9 |
|
|
|
|
| 6 |
pydub
|
| 7 |
Levenshtein
|
| 8 |
Werkzeug
|
| 9 |
+
gunicorn
|
| 10 |
|