Change Containerfile.backend_deps to use uv

This commit is contained in:
phil 2024-10-26 00:19:54 +02:00
parent 57a49840b2
commit 01341a0cd9

View file

@ -1,36 +1,8 @@
FROM localhost/trixie_python FROM localhost/trixie_python
MAINTAINER philo email phil.dev@philome.mooo.com MAINTAINER philo email phil.dev@philome.mooo.com
#ENV PROJ_DIR=/usr #ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONDONTWRITEBYTECODE 1
ENV PDM_CHECK_UPDATE=false
#RUN apk add --no-cache make cmake clang gdal-dev geos-dev proj-dev proj-util gcc musl-dev bash
#RUN apk add --no-cache gdal-dev geos-dev proj-dev proj-util gcc musl-dev bash
WORKDIR /usr/src/treetrail WORKDIR /usr/src/treetrail
COPY ./pyproject.toml ./README.md ./pdm.lock . COPY ./pyproject.toml ./README.md ./uv.lock .
# Cheating pdm with the app version to allow install of dependencies RUN uv sync
RUN PDM_BUILD_SCM_VERSION=1.0 pdm install --check --prod --no-editable
## Instances should populate these dirs below
RUN mkdir -p /usr/local/treetrail/osm \
/usr/local/treetrail/sprite \
/usr/local/treetrail/cache/plantekey/img \
/usr/local/treetrail/cache/plantekey/thumbnails \
/usr/local/treetrail/cache/plantekey/type \
/usr/local/treetrail/map/sprite \
/usr/local/treetrail/map/osm \
/usr/local/treetrail/attachments/tree \
/usr/local/treetrail/attachments/trail \
/usr/local/treetrail/attachments/poi
#COPY ./sprite /usr/local/treetrail
#COPY ./osm /usr/local/treetrail
#RUN python -c 'import _version as v;print(v.__version__)' > version.txt
#RUN PDM_BUILD_SCM_VERSION=$(cat version.txt) pdm install --check --prod --no-editable
#
# Clear some space (caches)
#RUN pdm cache clear
#RUN rm -rf .mypy_cache
#RUN rm -rf __pycache__