Skip to content

Commit

Permalink
added manual docker
Browse files Browse the repository at this point in the history
  • Loading branch information
PVirie committed Dec 25, 2024
1 parent 147511d commit b042db7
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/run_exp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,5 @@ jobs:
ssh -o StrictHostKeyChecking=no ${{ secrets.REMOTE_MACHINE_CONNECTION_STR }} << 'EOF'
cd ~/thinking
git pull
./run_manual.sh jax-gpu tasks/rl_hopper.py --clear
./run_manual.sh jax-gpu tasks/rl_hopper.py
./pod_run.sh
EOF
4 changes: 4 additions & 0 deletions pod_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

cd "$(dirname "$0")"
docker build -f Dockerfile -t thinking-jax-gpu .
58 changes: 58 additions & 0 deletions pod_run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/bin/bash

# run docker
# also add these option like in the compose

# jax-gpu-service:
# profiles: ["jax-gpu"]
# build:
# dockerfile: ./Dockerfile
# context: .
# container_name: thinking-gpu
# restart: no
# volumes:
# - ./artifacts/log/:/app/log
# - ./artifacts/cache:/app/cache
# - ./artifacts/experiments:/app/experiments
# - ./humn:/app/humn
# - ./core:/app/core
# - ./implementations:/app/implementations
# - ./tasks:/app/tasks
# environment:
# - ERROR_LOG=/app/log/error.log
# - LOG_LEVEL=info
# - PYTHONUNBUFFERED=TRUE
# - TF_CPP_MIN_LOG_LEVEL=0
# - MUJOCO_GL=osmesa
# env_file:
# - ./secrets.env
# ports:
# - "127.0.0.1:5678:5678"
# networks:
# - app_network
# deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# count: 1
# capabilities: [gpu]

cd "$(dirname "$0")"
docker stop thinking-jax-gpu
docker run -d --gpus all \
-v ./artifacts/log/:/app/log \
-v ./artifacts/cache:/app/cache \
-v ./artifacts/experiments:/app/experiments \
-v ./humn:/app/humn \
-v ./core:/app/core \
-v ./implementations:/app/implementations \
-v ./tasks:/app/tasks \
-e ERROR_LOG=/app/log/error.log \
-e LOG_LEVEL=info \
-e PYTHONUNBUFFERED=TRUE \
-e TF_CPP_MIN_LOG_LEVEL=0 \
-e MUJOCO_GL=osmesa \
--env-file ./secrets.env \
-p "127.0.0.1:5678:5678" \
thinking-jax-gpu

0 comments on commit b042db7

Please sign in to comment.