Spaces:
Runtime error
Runtime error
Commit ·
2180419
1
Parent(s): 1cfc24e
Update Dockerfile
Browse files- Dockerfile +15 -3
Dockerfile
CHANGED
|
@@ -1,13 +1,25 @@
|
|
| 1 |
FROM python:3.9
|
| 2 |
|
| 3 |
-
WORKDIR /code
|
| 4 |
RUN apt-get update && apt-get install -y git git-lfs ffmpeg libsm6 libxext6 cmake libgl1-mesa-glx && rm -rf /var/lib/apt/lists/* && git lfs install
|
| 5 |
RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
|
| 6 |
RUN dpkg -i google-chrome-stable_current_amd64.deb --fix-missing; apt-get -fy install
|
| 7 |
COPY ./requirements.txt /code/requirements.txt
|
| 8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
| 10 |
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
-
CMD ["uvicorn", "
|
|
|
|
| 1 |
FROM python:3.9
|
| 2 |
|
|
|
|
| 3 |
RUN apt-get update && apt-get install -y git git-lfs ffmpeg libsm6 libxext6 cmake libgl1-mesa-glx && rm -rf /var/lib/apt/lists/* && git lfs install
|
| 4 |
RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
|
| 5 |
RUN dpkg -i google-chrome-stable_current_amd64.deb --fix-missing; apt-get -fy install
|
| 6 |
COPY ./requirements.txt /code/requirements.txt
|
| 7 |
|
| 8 |
+
WORKDIR /code
|
| 9 |
+
|
| 10 |
+
COPY ./requirements.txt /code/requirements.txt
|
| 11 |
+
|
| 12 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
| 13 |
|
| 14 |
+
RUN useradd -m -u 1000 user
|
| 15 |
+
|
| 16 |
+
USER user
|
| 17 |
+
|
| 18 |
+
ENV HOME=/home/user \
|
| 19 |
+
PATH=/home/user/.local/bin:$PATH
|
| 20 |
+
|
| 21 |
+
WORKDIR $HOME/app
|
| 22 |
+
|
| 23 |
+
COPY --chown=user . $HOME/app
|
| 24 |
|
| 25 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|