Skip to content

Commit 8ad9630

Browse files
max4cclaude
andcommitted
fix: bake autoresearch into /opt to survive volume mount
The network volume mounts over /workspace at runtime, wiping out the baked-in repo. Clone to /opt/autoresearch instead and use /pre_start.sh to copy it to /workspace on first boot. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
1 parent b14eff1 commit 8ad9630

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
ARG BASE_IMAGE=non-existing
22
FROM ${BASE_IMAGE}
33

4-
# Clone autoresearch into workspace
4+
# Clone autoresearch to /opt (safe from volume mounts)
55
ARG AUTORESEARCH_REF=master
66
RUN git clone --branch ${AUTORESEARCH_REF} --depth 1 \
7-
https://github.com/runpod/autoresearch.git /workspace/autoresearch
7+
https://github.com/runpod/autoresearch.git /opt/autoresearch
88

9-
WORKDIR /workspace/autoresearch
9+
WORKDIR /opt/autoresearch
1010

1111
# Install Python dependencies
1212
RUN uv sync
1313

1414
# Download data and train tokenizer (~2 min)
1515
RUN uv run prepare.py
16+
17+
# Copy to /workspace on first boot (volume mount overlays /workspace at runtime)
18+
RUN echo '#!/bin/bash\nif [ ! -f /workspace/autoresearch/pyproject.toml ]; then\n cp -a /opt/autoresearch /workspace/autoresearch\nfi' > /pre_start.sh && \
19+
chmod +x /pre_start.sh

0 commit comments

Comments
 (0)