Skip to content
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,4 @@ __pycache__/

# agents
/arena_training/agents/
_meta/docker/features/vla_server/model/*.pth
15 changes: 15 additions & 0 deletions _meta/docker/features/vla_server/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
ARG TORCH_TAG=2.5.1-cuda12.4-cudnn9-runtime
FROM pytorch/pytorch:${TORCH_TAG} AS base

USER root

RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential git curl \
&& rm -rf /var/lib/apt/lists/*

RUN pip install --no-cache-dir --upgrade pip

RUN pip install fastapi "uvicorn[standard]" openai-clip Pillow numpy requests packaging matplotlib efficientnet_pytorch python-multipart

RUN sed -i 's/from pkg_resources import packaging/import packaging, packaging.version/' \
"$(python -c 'import clip, os; print(os.path.dirname(clip.__file__))')/clip.py" \
21 changes: 21 additions & 0 deletions _meta/docker/features/vla_server/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
services:
vla_server:
image: vla_server:omnivla-edge
pull_policy: "never"
build:
context: .
dockerfile: src/Arena/_meta/docker/features/vla_server/Dockerfile
# args:
volumes:
- "$HOST_ARENA_WS_DIR/src:/opt/arena_ws/src"
environment:
- HOST_ARENA_WS_DIR
- VLA_MODEL_DIR=/opt/arena_ws/src/Arena/_meta/docker/features/vla_server/model
command: ["python3", "/opt/arena_ws/src/Arena/_meta/docker/features/vla_server/server_omnivla_edge.py"]
network_mode: host
deploy:
resources:
reservations:
devices:
- driver: nvidia
capabilities: [gpu]
55 changes: 55 additions & 0 deletions _meta/docker/features/vla_server/main
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/usr/bin/env bash

name="vla_server"

update(){
set -e
arena registry add "$name"
arena_docker_compose build vla_server
}

uninstall(){
arena_docker_compose rm -fs vla_server || true
arena registry remove "$name"
}

launch(){
# Source only the docker function library — env vars (arena_compose_sudo, docker_env,
# HOST_ARENA_WS_DIR) are already correctly set by the container environment.
# Do NOT source the full setup script; it resets arena_compose_sudo="" and
# overwrites HOST_ARENA_WS_DIR with the in-container path.
# shellcheck source=/dev/null
source "$ARENA_DIR/_meta/docker/lib"
# Register feature so arena_docker_compose includes its docker-compose.yml overlay
grep -qxF "$name" "$ARENA_DIR/.installed" 2>/dev/null || \
echo "$name" >> "$ARENA_DIR/.installed"
# Stop any previous instance to avoid accumulated log-stream attachments
arena_docker_compose stop vla_server 2>/dev/null || true
# Run detached so only one log stream attaches; stop on process exit
arena_docker_compose up -d --remove-orphans vla_server
trap 'arena_docker_compose stop vla_server 2>/dev/null' EXIT INT TERM
arena_docker_compose logs -f vla_server
}

help(){
echo "Usage: $name <update|uninstall|launch>"
}
if [ $# -lt 1 ]; then
help
exit 1
fi
case "$1" in
update)
update
exit $?
;;
uninstall)
uninstall
# shellcheck disable=SC2317
return $? 2>/dev/null || exit $?
;;
launch)
launch
exit $?
;;
esac
Loading
Loading