github-actions[bot] commited on
Commit ·
eba0610
1
Parent(s): fec397b
Deploy from GitHub Actions: 744a3893263cdb96e12668a9b6e67de5bb7b5955
Browse files- .env.example +2 -0
- Dockerfile +3 -5
.env.example
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
PORT=
|
| 2 |
+
ALLOWED_ORIGINS=
|
Dockerfile
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
-
FROM python:3.
|
| 2 |
|
| 3 |
ENV PORT=7860
|
| 4 |
|
| 5 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 6 |
-
libgl1
|
| 7 |
libglib2.0-0 \
|
| 8 |
&& rm -rf /var/lib/apt/lists/*
|
| 9 |
|
|
@@ -18,8 +18,6 @@ WORKDIR $HOME/app
|
|
| 18 |
|
| 19 |
COPY --chown=user requirements.txt requirements.txt
|
| 20 |
|
| 21 |
-
RUN pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
|
| 22 |
-
|
| 23 |
RUN pip install --no-cache-dir --upgrade pip && \
|
| 24 |
pip install --no-cache-dir -r requirements.txt
|
| 25 |
|
|
@@ -29,4 +27,4 @@ COPY --chown=user . $HOME/app
|
|
| 29 |
|
| 30 |
EXPOSE ${PORT}
|
| 31 |
|
| 32 |
-
CMD ["
|
|
|
|
| 1 |
+
FROM python:3.13-slim
|
| 2 |
|
| 3 |
ENV PORT=7860
|
| 4 |
|
| 5 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 6 |
+
libgl1 \
|
| 7 |
libglib2.0-0 \
|
| 8 |
&& rm -rf /var/lib/apt/lists/*
|
| 9 |
|
|
|
|
| 18 |
|
| 19 |
COPY --chown=user requirements.txt requirements.txt
|
| 20 |
|
|
|
|
|
|
|
| 21 |
RUN pip install --no-cache-dir --upgrade pip && \
|
| 22 |
pip install --no-cache-dir -r requirements.txt
|
| 23 |
|
|
|
|
| 27 |
|
| 28 |
EXPOSE ${PORT}
|
| 29 |
|
| 30 |
+
CMD ["/bin/sh", "-c", "exec uvicorn main:app --host 0.0.0.0 --port $PORT"]
|