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

Fixing the docker build when Morpheus is a submodule #1914

Merged
Merged
Show file tree
Hide file tree
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
9 changes: 5 additions & 4 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -341,12 +341,13 @@ FROM conda_env_dev as git_clone
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 \
RUN --mount=type=bind,source=.,target=/opt/host_repo \
source activate morpheus &&\
git clone file:///opt/host_repo /tmp/morpheus_repo &&\
# Use a local clone to allow unpushed commits to be included
git clone file:///opt/host_repo/${MORPHEUS_ROOT_HOST} /tmp/morpheus_repo &&\
cd /tmp/morpheus_repo &&\
git lfs install &&\
/tmp/morpheus_repo/scripts/fetch_data.py fetch datasets examples
./scripts/fetch_data.py fetch datasets examples

# ============ Stage: runtime ============
# Setup container for runtime environment
Expand All @@ -357,7 +358,7 @@ ARG MORPHEUS_ROOT_HOST
# Only copy specific files/folders over that are necessary for runtime
COPY --from=git_clone "/tmp/morpheus_repo/conda/environments/*.yaml" "./conda/environments/"
COPY --from=git_clone "/tmp/morpheus_repo/docker" "./docker"
COPY --from=build_docs "/workspace/build/docs/html" "./docs"
COPY --from=build_docs "/workspace/${MORPHEUS_ROOT_HOST}/build/docs/html" "./docs"
COPY --from=git_clone "/tmp/morpheus_repo/examples" "./examples"
COPY --from=git_clone "/tmp/morpheus_repo/models/datasets" "./models/datasets"
COPY --from=git_clone "/tmp/morpheus_repo/scripts" "./scripts"
Expand Down
12 changes: 2 additions & 10 deletions docs/source/developer_guide/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,15 +160,7 @@ Note: These instructions assume the user is using `mamba` instead of `conda` sin
- Volta architecture GPU or better
- [CUDA 12.1](https://developer.nvidia.com/cuda-12-1-0-download-archive)
- `conda` and `mamba`
- Refer to the [Getting Started Guide](https://conda.io/projects/conda/en/latest/user-guide/install/index.html) if `conda` is not already installed
- Install `mamba`:

```bash
conda activate base
conda install -c conda-forge mamba
```

- **Note:** `mamba` should only be installed once in the base environment
- If `conda` and `mamba` are not installed, we recommend using the MiniForge install guide which is located [here](https://github.com/conda-forge/miniforge). This will install both `conda` and `mamba` and set the channel default to use `conda-forge`.

1. Set up environment variables and clone the repo:
```bash
Expand All @@ -177,7 +169,7 @@ Note: These instructions assume the user is using `mamba` instead of `conda` sin
cd $MORPHEUS_ROOT
```

1. Ensure all submodules are checked out:
2. Ensure all submodules are checked out:

```bash
git submodule update --init --recursive
Expand Down
Loading