Fix: Using dsh and glm5.3-flash
This commit is contained in:
1 parent
aeee758718
commit
5b691a577b
2 files changed
+23
-9
No files matched your search
+15
-5
@@ -69,19 +69,30 @@ WORKDIR /app/
|
||||
# Ref: https://docs.astral.sh/uv/guides/integration/docker/#using-the-environment
|
||||
ENV PATH="/app/.venv/bin:$PATH"
|
||||
|
||||
# Pass version from Makefile to setuptools-scm since .git is not in context
|
||||
ARG SETUPTOOLS_SCM_PRETEND_VERSION_FOR_BREWMAN
|
||||
ENV SETUPTOOLS_SCM_PRETEND_VERSION_FOR_BREWMAN=$SETUPTOOLS_SCM_PRETEND_VERSION_FOR_BREWMAN
|
||||
# Pass the version from the Makefile. The build context has no usable .git
|
||||
# (a git-URL build is a tag-less shallow clone and git is not installed), so
|
||||
# hatch-vcs cannot discover the version itself. hatch-vcs calls
|
||||
# setuptools_scm without a dist name, so only the generic
|
||||
# SETUPTOOLS_SCM_PRETEND_VERSION is honored - the
|
||||
# SETUPTOOLS_SCM_PRETEND_VERSION_FOR_<NAME> variant is silently ignored.
|
||||
ARG SETUPTOOLS_SCM_PRETEND_VERSION
|
||||
ENV SETUPTOOLS_SCM_PRETEND_VERSION=$SETUPTOOLS_SCM_PRETEND_VERSION
|
||||
|
||||
# Install dependencies
|
||||
# Ref: https://docs.astral.sh/uv/guides/integration/docker/#intermediate-layers
|
||||
RUN --mount=type=cache,target=/root/.cache/uv \
|
||||
--mount=type=bind,source=brewman/uv.lock,target=uv.lock \
|
||||
--mount=type=bind,source=brewman/pyproject.toml,target=pyproject.toml \
|
||||
--mount=source=.git,target=.git,type=bind \
|
||||
uv sync --locked --no-install-project
|
||||
|
||||
COPY /brewman ./
|
||||
|
||||
# hatch-vcs generates _version.py only inside uv's isolated wheel build, so
|
||||
# the source tree copied here lacks it. Write it ourselves (from the same
|
||||
# build arg) so importing brewman from /app works identically to the
|
||||
# installed wheel package in .venv.
|
||||
RUN printf '__version__ = version = "%s"\n' "$SETUPTOOLS_SCM_PRETEND_VERSION" > brewman/_version.py
|
||||
|
||||
COPY --from=builder /frontend/browser /app/frontend
|
||||
|
||||
# Sync the project
|
||||
@@ -89,7 +100,6 @@ COPY --from=builder /frontend/browser /app/frontend
|
||||
RUN --mount=type=cache,target=/root/.cache/uv \
|
||||
--mount=type=bind,source=brewman/uv.lock,target=uv.lock \
|
||||
--mount=type=bind,source=brewman/pyproject.toml,target=pyproject.toml \
|
||||
--mount=source=.git,target=.git,type=bind \
|
||||
uv sync --locked --no-editable
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
Reference in new issue
Block a user