Dockerfile 561 B

12345678910111213141516171819202122
  1. FROM python:3.12-slim
  2. WORKDIR /app
  3. ARG PIP_INDEX_URL=https://pypi.org/simple
  4. ENV POETRY_VIRTUALENVS_CREATE=false \
  5. PYTHONUNBUFFERED=1 \
  6. PYTHONDONTWRITEBYTECODE=1
  7. RUN pip install --no-cache-dir --index-url ${PIP_INDEX_URL} poetry
  8. COPY pyproject.toml poetry.lock ./
  9. RUN poetry source add --priority=primary tsinghua https://pypi.tuna.tsinghua.edu.cn/simple || true \
  10. && poetry lock \
  11. && poetry install --no-root --no-interaction --no-ansi
  12. COPY . .
  13. EXPOSE 33333
  14. CMD ["uvicorn", "alien_gateway.main:app", "--host", "0.0.0.0", "--port", "33333"]