Skip to content

Commit

Permalink
Set ov workdir to current working directory (#4527)
Browse files Browse the repository at this point in the history
* Set `ov` workdir to current working directory

This makes `ov` contextual to the working directory, so you can rely on your host CWD inside `ov`. This works because the Openverse repository is mapped with the literal directory path from your host (rather than to a distinct container path), so the CWD will exist in the container, so long as `ov` is run from within the repository

* Use `pwd` and use absolute reference for exec.py
  • Loading branch information
sarayourfriend authored Jun 21, 2024
1 parent 2befb89 commit 986fa67
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docker/dev_env/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ shared_args=(
-i
--env "OPENVERSE_PROJECT=$OPENVERSE_PROJECT"
--env "TERM=xterm-256color"
--workdir "$OPENVERSE_PROJECT"
--workdir "$(pwd)"
)

run_args=(
Expand Down Expand Up @@ -104,4 +104,4 @@ else
docker start "$existing_container_id" 1>/dev/null
fi

docker exec "${shared_args[@]}" "$container_name" python3 docker/dev_env/exec.py "${_cmd[@]}"
docker exec "${shared_args[@]}" "$container_name" python3 "$OPENVERSE_PROJECT"/docker/dev_env/exec.py "${_cmd[@]}"

0 comments on commit 986fa67

Please sign in to comment.