Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions official-templates/autoresearch/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
ARG BASE_IMAGE=non-existing
FROM ${BASE_IMAGE}

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

WORKDIR /workspace/autoresearch
WORKDIR /opt/autoresearch

# Install Python dependencies
RUN uv sync

# Download data and train tokenizer (~2 min)
RUN uv run prepare.py

# Copy to /workspace on first boot (volume mount overlays /workspace at runtime)
RUN echo '#!/bin/bash\nif [ ! -f /workspace/autoresearch/pyproject.toml ]; then\n cp -a /opt/autoresearch /workspace/autoresearch\nfi' > /pre_start.sh && \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Generate /pre_start.sh with real newlines

Because this image is built from runpod/base (see official-templates/base/Dockerfile:4, which sets SHELL to Bash), this RUN echo '...\n...' is executed by Bash; Bash only interprets \n with echo -e (help echo: "-e enable interpretation of backslash escapes"). As written, /pre_start.sh is emitted as one line with literal \n, so when /start.sh runs it, the copy command never executes and /workspace/autoresearch is not populated on first boot with a mounted /workspace volume.

Useful? React with 👍 / 👎.

chmod +x /pre_start.sh
Loading