gagannarula commited on
Commit
c2cb7b8
·
verified ·
1 Parent(s): 2c83848

test PR #226: sync app package with gpu group, --no-sync at start, clone branch

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -5
Dockerfile CHANGED
@@ -26,13 +26,18 @@ ENV HOME=/home/user
26
 
27
  RUN --mount=type=secret,id=GH_TOKEN,mode=0444,required=true \
28
  git -c "http.https://github.com/.extraheader=Authorization: Basic $(printf 'x-access-token:%s' "$(cat /run/secrets/GH_TOKEN)" | base64 | tr -d '\n')" \
29
- clone --single-branch --depth 1 https://github.com/earthspecies/esp-research.git /app/esp-research
30
 
31
- # alp-data is now published on PyPI and pinned in esp-research's pyproject.toml,
32
- # so uv sync resolves it directly -- no separate clone needed.
 
 
33
  WORKDIR /app/esp-research
34
- RUN uv sync --frozen
35
 
36
  WORKDIR /app/esp-research/projects/NatureLM-audio-hf-app
37
  EXPOSE 7860
38
- CMD ["uv", "run", "app.py"]
 
 
 
 
26
 
27
  RUN --mount=type=secret,id=GH_TOKEN,mode=0444,required=true \
28
  git -c "http.https://github.com/.extraheader=Authorization: Basic $(printf 'x-access-token:%s' "$(cat /run/secrets/GH_TOKEN)" | base64 | tr -d '\n')" \
29
+ clone --single-branch --depth 1 --branch fix-hf-app-cuda-torch https://github.com/earthspecies/esp-research.git /app/esp-research
30
 
31
+ # alp-data is now published on PyPI and is in esp-research's pyproject.toml,
32
+ # so uv sync resolves it directly, no clone needed.
33
+ # Sync this app's package (and its `gpu` group, which pins torch/torchaudio to
34
+ # the cu126 index) so the venv built here is exactly what the app runs with.
35
  WORKDIR /app/esp-research
36
+ RUN uv sync --frozen --package naturelm-audio-hf-app --group gpu
37
 
38
  WORKDIR /app/esp-research/projects/NatureLM-audio-hf-app
39
  EXPOSE 7860
40
+ # --no-sync: never re-resolve at container start. `uv run` would otherwise sync
41
+ # the app package without its `gpu` group and replace the cu126 torch stack with
42
+ # the CUDA 13 wheel from PyPI.
43
+ CMD ["uv", "run", "--no-sync", "app.py"]