use pyproject.toml to control deps

This commit is contained in:
sangge-rockpi 2024-01-18 22:29:09 +08:00
parent 95c7f84451
commit c2f0b9de48
2 changed files with 4 additions and 4 deletions

View File

@ -39,10 +39,10 @@ ENV PATH="${PATH}:/root/.local/bin" \
PIP_DEFAULT_TIMEOUT=100
# copy project files
COPY --chown=root:root requirements.txt main.py /app/ -i https://pypi.tuna.tsinghua.edu.cn/simple
COPY --chown=root:root pyproject.toml main.py /app/
# install dependencies
RUN python -m pip install /app/
RUN python -m pip install /app/ -i https://pypi.tuna.tsinghua.edu.cn/simple
# copy tests
COPY --chown=root:root tests /app/tests/

View File

@ -39,10 +39,10 @@ ENV PATH="${PATH}:/root/.local/bin" \
PIP_DEFAULT_TIMEOUT=100
# copy project files
COPY --chown=root:root requirements.txt main.py /app/
COPY --chown=root:root pyproject.toml main.py /app/
# install dependencies
RUN python -m pip install -r /app/requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
RUN python -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple
# execute program
CMD python /app/main.py