Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +9 -21
Dockerfile
CHANGED
|
@@ -1,28 +1,16 @@
|
|
| 1 |
-
|
|
|
|
| 2 |
|
| 3 |
-
|
| 4 |
-
RUN apt-get update && apt-get install -y wget
|
| 5 |
|
| 6 |
-
|
| 7 |
-
WORKDIR /app
|
| 8 |
|
| 9 |
-
|
| 10 |
-
COPY requirements.txt .
|
| 11 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
| 12 |
|
| 13 |
-
|
| 14 |
-
COPY app.py .
|
| 15 |
|
| 16 |
-
|
| 17 |
-
RUN wget https://github.com/gitpod-io/openvscode-server/releases/download/openvscode-server-v1.86.2/openvscode-server-v1.86.2-linux-x64.tar.gz -O /tmp/openvscode-server.tar.gz && \
|
| 18 |
-
tar -xzf /tmp/openvscode-server.tar.gz -C /opt && \
|
| 19 |
-
rm /tmp/openvscode-server.tar.gz && \
|
| 20 |
-
mv /opt/openvscode-server-v1.86.2-linux-x64 /opt/openvscode-server && \
|
| 21 |
-
chown -R 1000:1000 /opt/openvscode-server
|
| 22 |
|
| 23 |
-
|
| 24 |
-
EXPOSE 3000
|
| 25 |
-
EXPOSE 8080
|
| 26 |
|
| 27 |
-
|
| 28 |
-
CMD ["sh", "-c", "/opt/openvscode-server/bin/openvscode-server --host 0.0.0.0 --port 3000 & python app.py"]
|
|
|
|
| 1 |
+
# read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
|
| 2 |
+
# you will also find guides on how best to write your Dockerfile
|
| 3 |
|
| 4 |
+
FROM python:3.9
|
|
|
|
| 5 |
|
| 6 |
+
RUN useradd -m -u 1000 user
|
|
|
|
| 7 |
|
| 8 |
+
WORKDIR /app
|
|
|
|
|
|
|
| 9 |
|
| 10 |
+
COPY --chown=user ./requirements.txt requirements.txt
|
|
|
|
| 11 |
|
| 12 |
+
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
+
COPY --chown=user . /app
|
|
|
|
|
|
|
| 15 |
|
| 16 |
+
CMD ["python", "app.py"]
|
|
|