init
This commit is contained in:
commit
a8e86eaaa3
6 changed files with 1008 additions and 0 deletions
23
Dockerfile
Normal file
23
Dockerfile
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
FROM python:3.14-alpine
|
||||
|
||||
ENV PYTHONDONTWRITEBYTECODE=1 \
|
||||
PYTHONUNBUFFERED=1 \
|
||||
EDGING_LOG_LEVEL=INFO \
|
||||
PATH="/app/.venv/bin:$PATH"
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN apk add --no-cache ffmpeg && pip install uv
|
||||
|
||||
COPY pyproject.toml uv.lock .
|
||||
|
||||
RUN uv sync --frozen --no-dev
|
||||
|
||||
COPY src .
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
HEALTHCHECK --start-interval=1s --start-period=10s \
|
||||
CMD python -c "import json, urllib.request; data = urllib.request.urlopen('http://127.0.0.1:80/models', timeout=3).read(); payload = json.loads(data); raise SystemExit(0 if payload == {'data': []} else 1)"
|
||||
|
||||
CMD ["uvicorn", "edging.main:app", "--host", "0.0.0.0", "--port", "80"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue