Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +11 -10
Dockerfile
CHANGED
@@ -1,18 +1,19 @@
|
|
1 |
FROM python:3.10
|
2 |
|
3 |
-
|
|
|
4 |
|
|
|
5 |
COPY requirements.txt requirements.txt
|
6 |
-
RUN apt-get update && apt-get install git
|
7 |
-
RUN
|
8 |
-
RUN
|
9 |
|
10 |
-
#
|
11 |
-
ENV XDG_CACHE_HOME=/python-docker/.cache
|
12 |
-
|
13 |
-
RUN python -c "from transformers import pipeline; pipeline('automatic-speech-recognition', model='openai/whisper-small')"
|
14 |
COPY . .
|
15 |
|
16 |
-
|
|
|
17 |
|
18 |
-
|
|
|
|
1 |
FROM python:3.10
|
2 |
|
3 |
+
# Set the working directory
|
4 |
+
WORKDIR /app
|
5 |
|
6 |
+
# Copy the requirements file and install dependencies
|
7 |
COPY requirements.txt requirements.txt
|
8 |
+
RUN apt-get update && apt-get install -y git ffmpeg
|
9 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
10 |
+
RUN pip install --no-cache-dir "git+https://github.com/openai/whisper.git"
|
11 |
|
12 |
+
# Copy the entire application
|
|
|
|
|
|
|
13 |
COPY . .
|
14 |
|
15 |
+
# Expose the necessary port
|
16 |
+
EXPOSE 7860
|
17 |
|
18 |
+
# Set the entry point for Hugging Face Spaces
|
19 |
+
CMD ["python", "fastapi_app.py"]
|