Skip to content

Commit

Permalink
More beaker and docker fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jakep-allenai committed Jan 30, 2025
1 parent 9df86da commit 04844b3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions olmocr/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ def submit_beaker_job(args):
b = Beaker.from_env(default_workspace=args.beaker_workspace)
account = b.account.whoami()
owner = account.name
beaker_image = f"jakep/pdelfin-inference-{VERSION}"
beaker_image = f"jakep/olmocr-inference-{VERSION}"

task_name = f"olmocr-{os.path.basename(args.workspace.rstrip('/'))}"

Expand Down Expand Up @@ -745,7 +745,7 @@ def submit_beaker_job(args):
preemptible=True,
),
image=ImageSource(beaker=beaker_image),
command=["python", "-m", "olmocr.beakerpipeline"] + args_list,
command=["python", "-m", "olmocr.pipeline"] + args_list,
env_vars=[EnvVar(name="BEAKER_JOB_NAME", value=task_name), EnvVar(name="OWNER", value=owner)] + env_var_secrets,
resources=TaskResources(gpu_count=1),
constraints=Constraints(cluster=args.beaker_cluster if isinstance(args.beaker_cluster, list) else [args.beaker_cluster]),
Expand Down
8 changes: 4 additions & 4 deletions scripts/beaker/Dockerfile-inference
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ COPY olmocr/version.py olmocr/version.py

RUN /root/.local/bin/uv pip install --system --no-cache -e .[inference]

COPY olmocr olmocr
RUN /root/.local/bin/uv pip install --system --no-cache sgl-kernel==0.0.3.post1 --force-reinstall --no-deps
RUN /root/.local/bin/uv pip install --system --no-cache "sglang[all]==0.4.2" --find-links https://flashinfer.ai/whl/cu124/torch2.4/flashinfer/

# TODO You can remove this once pypdf > 5.10 comes out
RUN /root/.local/bin/uv pip install --system --no-cache git+https://github.com/py-pdf/pypdf.git@c6e43374ab002d76811ec85333fdc2c82c268251
COPY olmocr olmocr

WORKDIR /root
COPY olmocr olmocr

RUN python3 -m sglang.launch_server --help
RUN python3 -m olmocr.beakerpipeline --help
RUN python3 -m olmocr.pipeline --help
Empty file modified scripts/build-docker.sh
100644 → 100755
Empty file.

0 comments on commit 04844b3

Please sign in to comment.