Skip to content

Commit

Permalink
Use the local repo as the source of the git clone
Browse files Browse the repository at this point in the history
  • Loading branch information
dagardner-nv committed Jul 25, 2024
1 parent 5dca0d7 commit cd17f5f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
10 changes: 7 additions & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,12 @@ 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

RUN source activate morpheus &&\
git clone file://${MORPHEUS_ROOT_HOST} /tmp/morpheus_repo &&\
ARG MORPHEUS_ROOT_HOST

# Source the morpheus env to pick up the git-lfs package
RUN --mount=type=bind,source=${MORPHEUS_ROOT_HOST},target=/opt/host_repo \
source activate morpheus &&\
git clone file:///opt/host_repo /tmp/morpheus_repo &&\
cd /tmp/morpheus_repo &&\
git lfs install &&\
/tmp/morpheus_repo/scripts/fetch_data.py fetch datasets examples
Expand All @@ -309,7 +313,7 @@ COPY --from=git_clone "/tmp/morpheus_repo/conda/environments/*.yaml" "./conda/en
COPY --from=git_clone "/tmp/morpheus_repo/docker" "./docker"
COPY --from=build_docs "/workspace/build/docs/html" "./docs"
COPY --from=git_clone "/tmp/morpheus_repo/examples" "./examples"
COPY --from=git_clone "/tmp/models/datasets" "./models/datasets"
COPY --from=git_clone "/tmp/morpheus_repo/models/datasets" "./models/datasets"
COPY --from=git_clone "/tmp/morpheus_repo/scripts" "./scripts"
COPY --from=git_clone "/tmp/morpheus_repo/*.md" "./"
COPY --from=git_clone "/tmp/morpheus_repo/LICENSE" "./"
Expand Down
1 change: 0 additions & 1 deletion docker/build_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ DOCKER_ARGS="${DOCKER_ARGS} --build-arg LINUX_VER=${LINUX_VER}"
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} --network=host"

# Last add any extra args (duplicates override earlier ones)
Expand Down

0 comments on commit cd17f5f

Please sign in to comment.