Skip to content

Commit f0cb59c

Browse files
authored
Merge pull request #108 from runpod/dj/containers-v1
Fix autoresearch: bake into /opt to survive volume mount
2 parents f7b05c5 + 8ad9630 commit f0cb59c

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

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)