Spaces:
Sleeping
Sleeping
fixed Entrypoint and permissions
Browse files- Dockerfile +8 -11
Dockerfile
CHANGED
|
@@ -1,20 +1,17 @@
|
|
| 1 |
FROM python:3.13.5-slim
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
build-essential \
|
| 7 |
-
curl \
|
| 8 |
-
git \
|
| 9 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
|
| 11 |
-
|
| 12 |
-
COPY . ./
|
| 13 |
|
| 14 |
-
|
|
|
|
|
|
|
| 15 |
|
| 16 |
EXPOSE 7860
|
| 17 |
|
| 18 |
# HEALTHCHECK CMD curl --fail http://localhost:8000/_stcore/health
|
| 19 |
|
| 20 |
-
ENTRYPOINT ["uvicorn", "_app:app",
|
|
|
|
| 1 |
FROM python:3.13.5-slim
|
| 2 |
|
| 3 |
+
RUN useradd -m -u 1000 user
|
| 4 |
+
USER user
|
| 5 |
+
ENV PATH="/home/user/.local/bin:$PATH"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
+
WORKDIR /app
|
|
|
|
| 8 |
|
| 9 |
+
COPY --chown=user ./requirements.txt requirements.txt
|
| 10 |
+
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 11 |
+
COPY --chown=user . ./
|
| 12 |
|
| 13 |
EXPOSE 7860
|
| 14 |
|
| 15 |
# HEALTHCHECK CMD curl --fail http://localhost:8000/_stcore/health
|
| 16 |
|
| 17 |
+
ENTRYPOINT ["uvicorn", "_app:app", "--host", "0.0.0.0", "--port", "7860", "--reload"]
|