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

61051: Add inference files #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
14 changes: 13 additions & 1 deletion tests/test_pytorch_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ def test_folders(self):
f"{module_name}/models",
f"{module_name}/visualization",
"tests",
"inference",
]

abs_expected_dirs = [str(self.path / d) for d in expected_dirs]
Expand All @@ -146,4 +147,15 @@ def test_files(self):
def test_gitlab_pipeline(self):
_, _, abs_files = list(zip(*os.walk(self.path)))

assert ".gitlab-ci.yml" in abs_files[0]
assert ".gitlab-ci.yml" in abs_files[0]

def test_inference_files(self):
_, _, abs_files = list(zip(*os.walk(f"{self.path}/inference")))

expected_files = [
"Dockerfile",
"requirements.txt",
]

for expected_file in expected_files:
assert expected_file in abs_files[0]
12 changes: 12 additions & 0 deletions tests/test_r_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ def test_folders(self):
f"{module_name}/models",
f"{module_name}/visualization",
"tests",
"inference",
]

abs_expected_dirs = [str(self.path / d) for d in expected_dirs]
Expand All @@ -111,3 +112,14 @@ def test_files(self):
assert len(abs_files[0]) == 2
assert ".gitkeep" in abs_files[0]
assert "make_dataset.R" in abs_files[0]

def test_inference_files(self):
_, _, abs_files = list(zip(*os.walk(f"{self.path}/inference")))

expected_files = [
"Dockerfile",
"requirements.txt",
]

for expected_file in expected_files:
assert expected_file in abs_files[0]
14 changes: 13 additions & 1 deletion tests/test_tensorflow_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ def test_folders(self):
f"{module_name}/models",
f"{module_name}/visualization",
"tests",
"inference",
]

abs_expected_dirs = [str(self.path / d) for d in expected_dirs]
Expand All @@ -145,4 +146,15 @@ def test_files(self):
def test_gitlab_pipeline(self):
_, _, abs_files = list(zip(*os.walk(self.path)))

assert ".gitlab-ci.yml" in abs_files[0]
assert ".gitlab-ci.yml" in abs_files[0]

def test_inference_files(self):
_, _, abs_files = list(zip(*os.walk(f"{self.path}/inference")))

expected_files = [
"Dockerfile",
"requirements.txt",
]

for expected_file in expected_files:
assert expected_file in abs_files[0]
6 changes: 6 additions & 0 deletions {{ cookiecutter.repo_name }}/inference/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM nvcr.io/nvidia/tritonserver:24.04-py3

COPY inference/requirements.txt /requirements.txt
RUN pip3 install -r /requirements.txt

VOLUME /models
2 changes: 2 additions & 0 deletions {{ cookiecutter.repo_name }}/inference/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# torch==2.5.1
# tensorflow==2.18.0
Loading