update: multi python version
This commit is contained in:
@@ -3,7 +3,19 @@ FROM python-base:3.12
|
||||
COPY pyproject.toml uv.lock ./
|
||||
COPY common ./common
|
||||
COPY schedule ./schedule
|
||||
COPY extras ./extras
|
||||
RUN UV_DEFAULT_INDEX="https://pypi.tuna.tsinghua.edu.cn/simple/" uv sync --frozen --no-dev --no-editable --package schedule
|
||||
|
||||
RUN uv venv --python 3.12 /opt/venv/python3.12 && \
|
||||
UV_DEFAULT_INDEX="https://pypi.tuna.tsinghua.edu.cn/simple/" uv pip install --python /opt/venv/python3.12/bin/python -r extras/requirements-py312
|
||||
|
||||
RUN uv venv --python 3.8 /opt/venv/python3.8 && \
|
||||
UV_DEFAULT_INDEX="https://pypi.tuna.tsinghua.edu.cn/simple/" uv pip install --python /opt/venv/python3.8/bin/python -r extras/requirements-py38 && \
|
||||
/opt/venv/python3.8/bin/python -m ipykernel install --prefix=/opt/venv/python3.12 --name=python38 --display-name="python3.8"
|
||||
|
||||
RUN uv venv --python 3.10 /opt/venv/python3.10 && \
|
||||
UV_DEFAULT_INDEX="https://pypi.tuna.tsinghua.edu.cn/simple/" uv pip install --python /opt/venv/python3.10/bin/python -r extras/requirements-py310 && \
|
||||
/opt/venv/python3.10/bin/python -m ipykernel install --prefix=/opt/venv/python3.12 --name=python310 --display-name="python3.10"
|
||||
|
||||
EXPOSE 8000
|
||||
CMD ["uv", "run", "--frozen", "--package", "schedule", "gunicorn", "--config", "schedule/gunicorn.conf.py", "schedule.main:app"]
|
||||
|
||||
Reference in New Issue
Block a user