Spaces:
Paused
Paused
Commit ·
324fb15
1
Parent(s): b5a9ada
Update Dockerfile
Browse files- Dockerfile +11 -25
Dockerfile
CHANGED
|
@@ -1,27 +1,13 @@
|
|
| 1 |
-
FROM python:3.
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
PYTHONUNBUFFERED=1 \
|
| 5 |
-
PIP_NO_CACHE_DIR=1 \
|
| 6 |
-
PORT=7860
|
| 7 |
-
|
| 8 |
-
RUN apt-get update \
|
| 9 |
-
&& apt-get install -y --no-install-recommends bash git curl ca-certificates nodejs npm \
|
| 10 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 11 |
-
|
| 12 |
-
RUN useradd -m -u 1000 -s /bin/bash user
|
| 13 |
-
|
| 14 |
-
WORKDIR /home/user/app
|
| 15 |
-
|
| 16 |
-
COPY requirements.txt /home/user/app/requirements.txt
|
| 17 |
-
RUN pip install -r /home/user/app/requirements.txt
|
| 18 |
-
|
| 19 |
-
COPY --chown=user:user . /home/user/app
|
| 20 |
-
RUN mkdir -p /home/user/app/workspace /home/user/app/.agent_state \
|
| 21 |
-
&& chown -R user:user /home/user/app
|
| 22 |
-
|
| 23 |
USER user
|
| 24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
EXPOSE 7860
|
| 26 |
-
|
| 27 |
-
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 1 |
+
FROM python:3.10-slim
|
| 2 |
+
WORKDIR /app
|
| 3 |
+
RUN useradd -m -u 1000 user
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
USER user
|
| 5 |
+
ENV HOME=/home/user \
|
| 6 |
+
PATH=/home/user/.local/bin:$PATH
|
| 7 |
+
COPY --chown=user \
|
| 8 |
+
requirements.txt .
|
| 9 |
+
RUN pip install --no-cache-dir \
|
| 10 |
+
--user -r requirements.txt
|
| 11 |
+
COPY --chown=user . .
|
| 12 |
EXPOSE 7860
|
| 13 |
+
CMD ["python", "main.py"]
|
|
|