Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +5 -0
Dockerfile
CHANGED
@@ -2,6 +2,9 @@ FROM python:3.10
|
|
2 |
|
3 |
WORKDIR /python-docker
|
4 |
|
|
|
|
|
|
|
5 |
COPY requirements.txt requirements.txt
|
6 |
RUN apt-get update && apt-get install git -y
|
7 |
RUN pip3 install -r requirements.txt
|
@@ -9,6 +12,8 @@ RUN apt-get update && apt-get install -y ffmpeg
|
|
9 |
RUN python -c "from transformers import pipeline; pipeline('automatic-speech-recognition', model='openai/whisper-small')"
|
10 |
COPY . .
|
11 |
|
|
|
|
|
12 |
EXPOSE 8001
|
13 |
|
14 |
CMD ["uvicorn", "fastapi_app:app", "--host", "0.0.0.0", "--port", "8001"]
|
|
|
2 |
|
3 |
WORKDIR /python-docker
|
4 |
|
5 |
+
RUN useradd -m -u 1000 user
|
6 |
+
USER user
|
7 |
+
|
8 |
COPY requirements.txt requirements.txt
|
9 |
RUN apt-get update && apt-get install git -y
|
10 |
RUN pip3 install -r requirements.txt
|
|
|
12 |
RUN python -c "from transformers import pipeline; pipeline('automatic-speech-recognition', model='openai/whisper-small')"
|
13 |
COPY . .
|
14 |
|
15 |
+
COPY --chown=user:user . /python-docker
|
16 |
+
|
17 |
EXPOSE 8001
|
18 |
|
19 |
CMD ["uvicorn", "fastapi_app:app", "--host", "0.0.0.0", "--port", "8001"]
|