Spaces:
Runtime error
Runtime error
this one's good
Browse files- Dockerfile +15 -6
Dockerfile
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
FROM python:3.10
|
| 2 |
|
|
|
|
| 3 |
RUN apt-get update && apt-get install -y \
|
| 4 |
git \
|
| 5 |
git-lfs \
|
|
@@ -8,9 +9,8 @@ RUN apt-get update && apt-get install -y \
|
|
| 8 |
libxext6 \
|
| 9 |
cmake \
|
| 10 |
libgl1-mesa-glx \
|
| 11 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 12 |
-
|
| 13 |
-
RUN pip install --no-cache-dir https://gradio-builds.s3.amazonaws.com/f4d696f71f3fc2f5fd8f9d5f5287cb1d27ef93d4/gradio-3.39.0-py3-none-any.whl
|
| 14 |
|
| 15 |
# User
|
| 16 |
RUN useradd -m -u 1000 user
|
|
@@ -19,8 +19,17 @@ ENV HOME=/home/user \
|
|
| 19 |
PATH=/home/user/.local/bin:$PATH
|
| 20 |
WORKDIR /home/user/app
|
| 21 |
|
| 22 |
-
|
|
|
|
| 23 |
|
| 24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
-
|
|
|
|
| 1 |
FROM python:3.10
|
| 2 |
|
| 3 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
| 4 |
RUN apt-get update && apt-get install -y \
|
| 5 |
git \
|
| 6 |
git-lfs \
|
|
|
|
| 9 |
libxext6 \
|
| 10 |
cmake \
|
| 11 |
libgl1-mesa-glx \
|
| 12 |
+
&& rm -rf /var/lib/apt/lists/* \
|
| 13 |
+
&& git lfs install
|
|
|
|
| 14 |
|
| 15 |
# User
|
| 16 |
RUN useradd -m -u 1000 user
|
|
|
|
| 19 |
PATH=/home/user/.local/bin:$PATH
|
| 20 |
WORKDIR /home/user/app
|
| 21 |
|
| 22 |
+
RUN pip install --no-cache-dir pip==22.3.1
|
| 23 |
+
RUN pip install --no-cache-dir https://gradio-builds.s3.amazonaws.com/f4d696f71f3fc2f5fd8f9d5f5287cb1d27ef93d4/gradio-3.39.0-py3-none-any.whl
|
| 24 |
|
| 25 |
+
COPY --link --chown=1000 --from=lfs /app /home/user/app
|
| 26 |
+
COPY --link --chown=1000 ./ /home/user/app
|
| 27 |
+
ENV PYTHONPATH=$HOME/app \
|
| 28 |
+
PYTHONUNBUFFERED=1 \
|
| 29 |
+
GRADIO_ALLOW_FLAGGING=never \
|
| 30 |
+
GRADIO_NUM_PORTS=1 \
|
| 31 |
+
GRADIO_SERVER_NAME=0.0.0.0 \
|
| 32 |
+
GRADIO_THEME=huggingface \
|
| 33 |
+
SYSTEM=spaces
|
| 34 |
|
| 35 |
+
ENTRYPOINT ["python", "app.py"]
|