Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCKER] Only pass pythonpath for ci images #6005

Merged
merged 1 commit into from
Jul 7, 2020
Merged
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
12 changes: 9 additions & 3 deletions docker/bash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ else
DOCKER_BINARY="docker"
fi

if [[ "${DOCKER_IMAGE_NAME}" == *"ci"* ]]; then
CI_PY_ENV="-e PYTHONPATH=/workspace/python:/workspace/topi/python"
else
CI_PY_ENV=""
fi

# Print arguments.
echo "WORKSPACE: ${WORKSPACE}"
echo "DOCKER CONTAINER NAME: ${DOCKER_IMAGE_NAME}"
Expand Down Expand Up @@ -98,10 +104,10 @@ ${DOCKER_BINARY} run --rm --pid=host\
-e "CI_BUILD_UID=$(id -u)" \
-e "CI_BUILD_GROUP=$(id -g -n)" \
-e "CI_BUILD_GID=$(id -g)" \
-e "PYTHONPATH=/workspace/python:/workspace/topi/python"\
-e "CI_PYTEST_ADD_OPTIONS=$CI_PYTEST_ADD_OPTIONS" \
${CUDA_ENV}\
${CI_PY_ENV} \
${CUDA_ENV} \
${CI_DOCKER_EXTRA_PARAMS[@]} \
${DOCKER_IMAGE_NAME}\
${DOCKER_IMAGE_NAME} \
bash --login /docker/with_the_same_user \
${COMMAND[@]}