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

Remove redundant copy of libmrc_pymrc.so #429

Merged
merged 7 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
28 changes: 14 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,39 @@ ARG PYTHON_VER=3.10
FROM ${FROM_IMAGE}:cuda11.8.0-ubuntu20.04-py3.10 AS base

ARG PROJ_NAME=mrc
ARG USERNAME=morpheus
ARG USER_UID=1000
ARG USER_GID=$USER_UID

SHELL ["/bin/bash", "-c"]

RUN --mount=type=cache,target=/var/cache/apt \
apt update &&\
apt install --no-install-recommends -y \
libnuma1 && \
libnuma1 \
sudo && \
rm -rf /var/lib/apt/lists/*

# create a user inside the container
RUN useradd --uid $USER_UID --gid $USER_GID -m $USERNAME && \
usermod --shell /bin/bash $USERNAME && \
echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME && \
chmod 0440 /etc/sudoers.d/$USERNAME

COPY ./conda/environments/all_cuda-118_arch-x86_64.yaml /opt/mrc/conda/environments/all_cuda-118_arch-x86_64.yaml

RUN --mount=type=cache,target=/opt/conda/pkgs,sharing=locked \
echo "create env: ${PROJ_NAME}" && \
sudo -g conda -u $USERNAME \
CONDA_ALWAYS_YES=true \
/opt/conda/bin/mamba env create -q -n ${PROJ_NAME} --file /opt/mrc/conda/environments/all_cuda-118_arch-x86_64.yaml && \
chmod -R a+rwX /opt/conda && \
rm -rf /tmp/conda

RUN /opt/conda/bin/conda init --system &&\
sed -i 's/xterm-color)/xterm-color|*-256color)/g' ~/.bashrc &&\
echo "conda activate ${PROJ_NAME}" >> ~/.bashrc
echo "conda activate ${PROJ_NAME}" >> ~/.bashrc && \
cp /root/.bashrc /home/$USERNAME/.bashrc

# disable sscache wrappers around compilers
ENV CMAKE_CUDA_COMPILER_LAUNCHER=
Expand Down Expand Up @@ -76,7 +88,6 @@ RUN --mount=type=cache,target=/var/cache/apt \
less \
openssh-client \
psmisc \
sudo \
vim-tiny \
&& \
rm -rf /var/lib/apt/lists/*
Expand All @@ -91,17 +102,6 @@ RUN --mount=type=cache,target=/var/cache/apt \
apt-get install --no-install-recommends -y dotnet-sdk-6.0 &&\
rm -rf /var/lib/apt/lists/*

# create a user inside the container
ARG USERNAME=morpheus
ARG USER_UID=1000
ARG USER_GID=$USER_UID

RUN useradd --uid $USER_UID --gid $USER_GID -m $USERNAME && \
usermod --shell /bin/bash $USERNAME && \
echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME && \
chmod 0440 /etc/sudoers.d/$USERNAME && \
cp /root/.bashrc /home/$USERNAME/.bashrc

USER $USERNAME

# default working directory
Expand Down
6 changes: 5 additions & 1 deletion python/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
include versioneer.py
include mrc/_version.py
recursive-include mrc *.so py.typed *.pyi
recursive-include mrc py.typed *.pyi
recursive-include mrc/_pymrc/tests *.so
recursive-include mrc/benchmarking *.so
recursive-include mrc/core *.so
recursive-include mrc/tests *.so
30 changes: 13 additions & 17 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,16 @@
##############################################################################
# - Python package generation ------------------------------------------------

setup(
name="mrc",
description="mrc",
version=versioneer.get_version(),
classifiers=[
"Intended Audience :: Developers", "Programming Language :: Python", "Programming Language :: Python :: 3.10"
],
author="NVIDIA Corporation",
setup_requires=[],
include_package_data=True,
packages=find_namespace_packages(include=["mrc*"], exclude=["tests", "mrc.core.segment.module_definitions"]),
package_data={
"mrc": ["_pymrc/*.so"] # Add the pymrc library for the root package
},
license="Apache",
cmdclass=versioneer.get_cmdclass(),
zip_safe=False)
setup(name="mrc",
description="mrc",
version=versioneer.get_version(),
classifiers=[
"Intended Audience :: Developers", "Programming Language :: Python", "Programming Language :: Python :: 3.10"
],
author="NVIDIA Corporation",
setup_requires=[],
include_package_data=True,
packages=find_namespace_packages(include=["mrc*"], exclude=["tests", "mrc.core.segment.module_definitions"]),
license="Apache",
cmdclass=versioneer.get_cmdclass(),
zip_safe=False)
Loading