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

Add setup script for NeMo-Export package (submodule) #12006

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
2 changes: 2 additions & 0 deletions requirements/requirements_infer_nim.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
tensorstore==0.1.45
zarr==2.18.2
52 changes: 52 additions & 0 deletions setup_export.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import importlib.util
import os
import setuptools

spec = importlib.util.spec_from_file_location('package_info', 'nemo/package_info.py')
package_info = importlib.util.module_from_spec(spec)
spec.loader.exec_module(package_info)


__contact_emails__ = package_info.__contact_emails__
__contact_names__ = package_info.__contact_names__
__download_url__ = package_info.__download_url__
__license__ = package_info.__license__
__repository_url__ = package_info.__repository_url__
__version__ = package_info.__version__


def req_file(filename, folder="requirements"):
with open(os.path.join(folder, filename), encoding='utf-8') as f:
content = f.readlines()
return [x.strip() for x in content]


setuptools.setup(
name="nemo_export",
version=__version__,
description="NeMo Export - a package to export NeMo checkpoints to TensorRT-LLM",
long_description="NeMo Export - a package to export NeMo checkpoints to TensorRT-LLM",
url=__repository_url__,
download_url=__download_url__,
author=__contact_names__,
maintainer=__contact_names__,
maintainer_email=__contact_emails__,
license=__license__,
packages=setuptools.find_packages(include=["nemo", "nemo.export*", "nemo.deploy"]),
install_requires=req_file("requirements_infer_nim.txt"),
zip_safe=False,
)
Loading