Dockerfile 518 B

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