Skip to content

Commit

Permalink
Use the host's repo as the git url
Browse files Browse the repository at this point in the history
  • Loading branch information
dagardner-nv committed Jul 25, 2024
1 parent f605a62 commit 83928b7
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 25 deletions.
12 changes: 1 addition & 11 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,6 @@ ARG MORPHEUS_ROOT_HOST=.
# Supply a channel alias to use for conda. This is needed if the conda channels go down
ARG CONDA_CHANNEL_ALIAS="https://conda.anaconda.org"

# Git arguments used for the release build
ARG GIT_URL=""
ARG GIT_BRANCH=""
ARG GIT_COMMIT=""

# ============ Stage: base ============
# Configure the base conda environment
FROM ${FROM_IMAGE}:${CUDA_MAJOR_VER}.${CUDA_MINOR_VER}.${CUDA_REV_VER}-base-${LINUX_DISTRO}${LINUX_VER} AS base
Expand Down Expand Up @@ -297,14 +292,9 @@ RUN --mount=type=bind,from=conda_bld_morpheus,source=/opt/conda/conda-bld,target
# unintentionally including build artifacts or other files that shouldn't be in the final image
FROM conda_env_dev as git_clone

ARG GIT_URL
ARG GIT_BRANCH
ARG GIT_COMMIT

RUN source activate morpheus &&\
git clone --branch ${GIT_BRANCH} ${GIT_URL} /tmp/morpheus_repo &&\
git clone file://${MORPHEUS_ROOT_HOST} /tmp/morpheus_repo &&\
cd /tmp/morpheus_repo &&\
git checkout ${GIT_COMMIT} &&\
git lfs install &&\
/tmp/morpheus_repo/scripts/fetch_data.py fetch datasets examples

Expand Down
7 changes: 0 additions & 7 deletions docker/build_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ LINUX_VER=${LINUX_VER:-22.04}
MORPHEUS_SUPPORT_DOCA=${MORPHEUS_SUPPORT_DOCA:-"OFF"}
PYTHON_VER=${PYTHON_VER:-3.10}

# Build args needed for the release build
GIT_URL=${GIT_URL:-""}
GIT_BRANCH=${GIT_BRANCH:-""}
GIT_COMMIT=${GIT_COMMIT:-""}

# Determine the relative path from $PWD to $MORPHEUS_ROOT
MORPHEUS_ROOT_HOST=${MORPHEUS_ROOT_HOST:-"$(realpath --relative-to=${PWD} ${MORPHEUS_ROOT})"}

Expand All @@ -58,8 +53,6 @@ DOCKER_ARGS="${DOCKER_ARGS} --build-arg MORPHEUS_ROOT_HOST=${MORPHEUS_ROOT_HOST}
DOCKER_ARGS="${DOCKER_ARGS} --build-arg MORPHEUS_SUPPORT_DOCA=${MORPHEUS_SUPPORT_DOCA}"
DOCKER_ARGS="${DOCKER_ARGS} --build-arg PYTHON_VER=${PYTHON_VER}"
DOCKER_ARGS="${DOCKER_ARGS} --build-arg GIT_URL=${GIT_URL}"
DOCKER_ARGS="${DOCKER_ARGS} --build-arg GIT_BRANCH=${GIT_BRANCH}"
DOCKER_ARGS="${DOCKER_ARGS} --build-arg GIT_COMMIT=${GIT_COMMIT}"
DOCKER_ARGS="${DOCKER_ARGS} --network=host"

# Last add any extra args (duplicates override earlier ones)
Expand Down
7 changes: 0 additions & 7 deletions docker/build_container_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,6 @@ export DOCKER_IMAGE_NAME=${DOCKER_IMAGE_NAME:-"nvcr.io/nvidia/morpheus/morpheus"
export DOCKER_IMAGE_TAG=${DOCKER_IMAGE_TAG:-"$(git describe --tags --abbrev=0)-runtime"}
export DOCKER_TARGET=${DOCKER_TARGET:-"runtime"}

export GIT_URL=${GIT_URL:-$(git remote get-url origin)}

# Ensure we have an https url
GIT_URL=$(echo $url | sed -e 's|^git@github\.com:|https://github.com/|')
export GIT_BRANCH=$(git branch --show-current)
export GIT_COMMIT=$(git log -n 1 --pretty=format:%H)

popd &> /dev/null

# Call the general build script
Expand Down

0 comments on commit 83928b7

Please sign in to comment.