Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +14 -10
Dockerfile
CHANGED
@@ -1,19 +1,23 @@
|
|
1 |
FROM python:3.10
|
2 |
|
3 |
# Set the working directory
|
4 |
-
WORKDIR /
|
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
|
10 |
-
RUN pip install
|
11 |
|
12 |
-
|
13 |
-
|
|
|
|
|
|
|
14 |
|
15 |
-
|
16 |
-
|
|
|
|
|
17 |
|
18 |
-
|
19 |
-
CMD ["python", "fastapi_app.py"]
|
|
|
1 |
FROM python:3.10
|
2 |
|
3 |
# Set the working directory
|
4 |
+
WORKDIR /code
|
5 |
|
6 |
# Copy the requirements file and install dependencies
|
7 |
+
COPY ./requirements.txt /code/requirements.txt
|
8 |
RUN apt-get update && apt-get install -y git ffmpeg
|
9 |
+
RUN pip install -r requirements.txt
|
10 |
+
RUN pip install "git+https://github.com/openai/whisper.git"
|
11 |
|
12 |
+
RUN useradd user
|
13 |
+
USER user
|
14 |
+
|
15 |
+
ENV HOME=/home/user \
|
16 |
+
PATH=/home/user/.local/bin:$PATH
|
17 |
|
18 |
+
WORKDIR $HOME/app
|
19 |
+
|
20 |
+
# Copy the entire application
|
21 |
+
COPY --chown=user . $HOME/app
|
22 |
|
23 |
+
CMD ["uvicorn", "fastapi_app:app", "--host", "0.0.0.0", "--port", "8000"]
|
|