Skip to content

Commit af42cd6

Browse files
committed
fix failing container setup
error is "detected dubious ownership in repository at '/home/vscode/workspace'" due to use of devcontainer in CI
1 parent 642c48f commit af42cd6

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

bash/docker_container_setup.sh

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,20 @@
22
set -e
33

44
PARENT_DIR=$(dirname "$(readlink -f "$0")")
5+
mkdir -p $HOME
56

67
if [[ -z "$CI" ]]; then
7-
export workspace=/workspace
8-
option="-e"
8+
# local dev
9+
git config --global --add safe.directory /workspace
10+
editable_install_flag="--editable"
911
else
10-
export workspace=/__w/data-engineering/data-engineering
12+
# running in github CI
13+
git config --global --add safe.directory /__w/data-engineering/data-engineering
14+
# in case the devcontainer is being used
15+
git config --global --add safe.directory /home/vscode/workspace
1116
fi
1217

13-
mkdir -p $HOME
14-
git config --global --add safe.directory $workspace
15-
16-
python3 -m pip install $option . -c ./admin/run_environment/constraints.txt --no-deps
18+
python3 -m pip install $editable_install_flag . --constraint ./admin/run_environment/constraints.txt --no-deps
1719

1820
# configure minio for use with S3 buckets in Digital Ocean
1921
mc alias set spaces "$AWS_S3_ENDPOINT" "$AWS_ACCESS_KEY_ID" "$AWS_SECRET_ACCESS_KEY" --api S3v4

0 commit comments

Comments
 (0)