Skip to content

Commit

Permalink
allow private repo clones with gh
Browse files Browse the repository at this point in the history
  • Loading branch information
AkshitaB committed Oct 7, 2024
1 parent 3f4bbd3 commit 3e9ce84
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/olmo_core/internal/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ def build_common_components(
BeakerEnvSecret(name="AWS_CREDENTIALS", secret=f"{beaker_user}_AWS_CREDENTIALS"),
BeakerEnvSecret(name="R2_ENDPOINT_URL", secret="R2_ENDPOINT_URL"),
BeakerEnvSecret(name="WEKA_ENDPOINT_URL", secret="WEKA_ENDPOINT_URL"),
BeakerEnvSecret(name="GITHUB_TOKEN", secret=f"{beaker_user}_GITHUB_TOKEN"),
],
setup_steps=[
# Setup python environment.
Expand Down
9 changes: 2 additions & 7 deletions src/olmo_core/launch/beaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,18 +296,13 @@ def build_experiment_spec(self) -> ExperimentSpec:
# Get repository account, name, and current ref.
github_account, github_repo, git_ref, is_public = ensure_repo(self.allow_dirty)

if not is_public:
raise OLMoConfigurationError(
"Only public repositories are supported at the moment. "
"Please use beaker-gantry to launch jobs with private repos."
)

entrypoint_script = [
"#!/usr/bin/env bash",
"set -exuo pipefail",
"mkdir -p /olmo-core-runtime",
"cd /olmo-core-runtime",
'git clone "${REPO_URL}" .',
"conda install gh --channel conda-forge",
'gh repo clone "${REPO_URL}" .',
'git checkout "${GIT_REF}"',
"git submodule update --init --recursive",
*self.setup_steps,
Expand Down

0 comments on commit 3e9ce84

Please sign in to comment.