Skip to content

Commit

Permalink
Beaker running
Browse files Browse the repository at this point in the history
  • Loading branch information
jakep-allenai committed Nov 13, 2024
1 parent 867e2c9 commit 39256c1
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
6 changes: 4 additions & 2 deletions pdelfin/beakerpipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,8 @@ async def metrics_reporter():
logger.info("\n" + str(await tracker.get_status_table()))
await asyncio.sleep(10)



def submit_beaker_job(args):
from beaker import (
Beaker,
Expand All @@ -534,12 +536,12 @@ def submit_beaker_job(args):

b = Beaker.from_env(default_workspace=args.beaker_workspace)
account = b.account.whoami()
beaker_image = "ai2/cuda11.8-ubuntu20.04"
beaker_image = "jakep/pdelfin-inference"

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

args_list = sum(([f"--{k}", str(v)] if not isinstance(v, bool) else [f"--{k}"] for k, v in vars(args).items() if v is not None), [])
args_list = [arg for arg in sys.argv[1:] if arg != "--beaker"]

# Create the experiment spec
experiment_spec = ExperimentSpec(
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ dependencies = [
"zstandard",
"aiohttp",
"boto3",
"torch>=2.5.0",
"torch>=2.4.0",
"transformers>=4.46.2",
]
license = {file = "LICENSE"}
Expand Down
2 changes: 1 addition & 1 deletion scripts/beaker/Dockerfile-inference
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ RUN /root/.local/bin/uv pip install --system --no-cache -e .[inference]

# TODO You can remove this and move it into the pyproject.toml once sglang makes a release > 0.35.0
RUN /root/.local/bin/uv pip install --system git+https://github.com/sgl-project/sglang.git@eff468dd5a3d24646560eb044276585f7a11ac3c#subdirectory=python&egg=sglang[all]

RUN /root/.local/bin/uv pip install --system flashinfer -i https://flashinfer.ai/whl/cu121/torch2.4/

RUN python3 -m pdelfin.beakerpipeline --help

8 changes: 7 additions & 1 deletion scripts/build-docker.sh
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
docker build -f ./scripts/beaker/Dockerfile-inference -t pdelfin-inference .
#!/bin/bash

set -e

docker build --platform linux/amd64 -f ./scripts/beaker/Dockerfile-inference -t pdelfin-inference .

beaker image create --workspace ai2/oe-data-pdf --name pdelfin-inference pdelfin-inference

0 comments on commit 39256c1

Please sign in to comment.