Skip to content

Commit ad37e03

Browse files
committed
0.1.0 release of Neural Graphics Model Gym
Signed-off-by: Richard Burton <richard.burton@arm.com>
0 parents  commit ad37e03

File tree

192 files changed

+22911
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

192 files changed

+22911
-0
lines changed

.blocklint

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# SPDX-FileCopyrightText: <text>Copyright 2025 Arm Limited and/or
2+
# its affiliates <open-source-office@arm.com></text>
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
[blocklint]
6+
# Do not allow any non-inclusive language
7+
max_issue_threshold = 1
8+
9+
# Blocklist: Words to lint in any context, with possibly special characters between,
10+
# case insensitive
11+
blocklist = master,slave,blacklist,whitelist,dummy,woman,women
12+
13+
# Word list: Words to lint as whole words, with possibly special characters between,
14+
# case insensitive
15+
wordlist = he,she,him,her,his,hers,dumb,neurotic,sane,woman,gal,lady,babe,bimbo,chick,guy,lad,fellow,dude,bro,gentleman,women,girls,gals,ladies,men,guys,dudes,gents,gentlemen
16+
17+
# Exact list: Words to lint as whole words exactly as entered
18+
; exactlist =
19+
20+
# Files that should not be checked by blocklint.
21+
# skip_files =

.dockerignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# SPDX-FileCopyrightText: <text>Copyright 2025 Arm Limited and/or
2+
# its affiliates <open-source-office@arm.com></text>
3+
# SPDX-License-Identifier: Apache-2.0
4+
*.egg-info
5+
*.pyc
6+
*~
7+
.eggs/
8+
\.eggs
9+
__pycache__
10+
build/
11+
dist/
12+
output/*
13+
.vscode
14+
.idea
15+
*.html
16+
coverage.json
17+
.coverage*
18+
venv/
19+
logs/
20+
.slangtorch_cache/
21+
*.lock
22+
tensorboard-logs/*
23+
checkpoints/*
24+
.cache/*

.editorconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# SPDX-FileCopyrightText: <text>Copyright 2024-2025 Arm Limited and/or
2+
# its affiliates <open-source-office@arm.com></text>
3+
# SPDX-License-Identifier: Apache-2.0
4+
[*.py]
5+
max_line_length = 100

.gitattributes

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# SPDX-FileCopyrightText: <text>Copyright 2024-2025 Arm Limited and/or
2+
# its affiliates <open-source-office@arm.com></text>
3+
# SPDX-License-Identifier: Apache-2.0
4+
*.pt filter=lfs diff=lfs merge=lfs -text
5+
*.safetensors filter=lfs diff=lfs merge=lfs -text
6+
*.exr filter=lfs diff=lfs merge=lfs -text
7+
src/ng_model_gym/bin/model-converter filter=lfs diff=lfs merge=lfs -text

.gitignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# SPDX-FileCopyrightText: <text>Copyright 2024-2025 Arm Limited and/or
2+
# its affiliates <open-source-office@arm.com></text>
3+
# SPDX-License-Identifier: Apache-2.0
4+
*.egg-info
5+
*.pyc
6+
*~
7+
.eggs/
8+
\.eggs
9+
__pycache__
10+
build/
11+
dist/
12+
output/
13+
.vscode
14+
.idea
15+
*.html
16+
coverage.json
17+
.coverage*
18+
coverage_html/
19+
venv/
20+
logs/
21+
.slangtorch_cache/
22+
*.lock
23+
tensorboard-logs/*
24+
checkpoints/*
25+
.cache/*
26+
*.pt
27+
!tests/nss/unit/data/nss_v1_golden_values/*.pt
28+
*.safetensors

.pre-commit-config.yaml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# SPDX-FileCopyrightText: <text>Copyright 2024-2025 Arm Limited and/or
2+
# its affiliates <open-source-office@arm.com></text>
3+
# SPDX-License-Identifier: Apache-2.0
4+
repos:
5+
- repo: https://github.com/pre-commit/pre-commit-hooks
6+
rev: v3.2.0
7+
hooks:
8+
# See https://github.com/pre-commit/pre-commit-hooks to add more hooks.
9+
- id: trailing-whitespace
10+
- id: check-yaml
11+
- id: check-json
12+
- repo: https://github.com/fsfe/reuse-tool
13+
rev: v3.0.0
14+
hooks:
15+
- id: reuse
16+
name: Run copyright check
17+
- repo: local
18+
hooks:
19+
# Run autoflake
20+
- id: autoflake
21+
name: Run autoflake to remove unused imports
22+
entry: autoflake
23+
language: system
24+
types: [ python ]
25+
require_serial: true
26+
args:
27+
[
28+
"--remove-all-unused-imports",
29+
"--remove-unused-variables",
30+
"--recursive",
31+
"--in-place"
32+
]
33+
# Run isort
34+
- id: isort
35+
name: Run isort to reorder imports
36+
entry: isort src/ scripts/ tests/ *.py
37+
language: system
38+
types: [ python ]
39+
require_serial: true
40+
# Run formatting tool on all scripts
41+
- id: format
42+
name: Run formatting
43+
entry: black
44+
language: python
45+
types: [ python ]
46+
require_serial: true
47+
# Run pylint for all Python scripts, excluding tests directory.
48+
- id: pylint
49+
name: Run pylint src
50+
entry: pylint
51+
language: python
52+
types: [ python ]
53+
exclude: "^tests/"
54+
require_serial: true
55+
args:
56+
[]
57+
# Run pylint for all Python scripts in tests directory.
58+
- id: pylint
59+
name: Run pylint tests
60+
entry: pylint
61+
language: python
62+
types: [ python ]
63+
files: "^tests/"
64+
require_serial: true
65+
args:
66+
[
67+
"--disable=invalid-name" # Disable due to unittest setUp and tearDown functions not following conventions.
68+
]
69+
# Run bandit security checks
70+
- id: bandit
71+
name: Run security checks
72+
entry: bandit
73+
language: python
74+
'types': [ python ]
75+
args:
76+
[
77+
"--configfile=pyproject.toml",
78+
"-r",
79+
"-f=html",
80+
"-o=report.html"
81+
]
82+
# Run blocklint non-inclusive language checks
83+
- id: blocklint
84+
name: Run blocklint non-inclusive language checks
85+
entry: blocklint
86+
language: python
87+
args: [
88+
"--skip-files=src/ng_model_gym/nss/model/shaders/depth_clip.slang,scripts/safetensors_generator/fsr2_methods.py,pyproject.toml"
89+
]
90+
files: ^(docs/|src/|tests/|scripts/)
91+
require_serial: true

Dockerfile

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# SPDX-FileCopyrightText: <text>Copyright 2025 Arm Limited and/or
2+
# its affiliates <open-source-office@arm.com></text>
3+
# SPDX-License-Identifier: Apache-2.0
4+
FROM ubuntu:22.04
5+
6+
ENV DEBIAN_FRONTEND=noninteractive
7+
8+
LABEL description="Docker image for the Neural Graphics Model Gym"
9+
LABEL author="Arm Limited"
10+
11+
# Install dependencies
12+
RUN apt-get update && \
13+
apt-get install -y \
14+
make \
15+
git \
16+
locales \
17+
vim \
18+
python3.10 \
19+
python3-pip \
20+
python3.10-dev \
21+
python3.10-venv \
22+
build-essential \
23+
ninja-build \
24+
curl \
25+
wget \
26+
dpkg \
27+
ca-certificates \
28+
&& rm -rf /var/lib/apt/lists/*
29+
30+
# Set locale for Docker container
31+
RUN locale-gen en_GB.UTF-8 && \
32+
update-locale LC_ALL=en_GB.UTF-8 LANG=en_GB.UTF-8
33+
ENV LANG=en_GB.UTF-8
34+
ENV LC_ALL=en_GB.UTF-8
35+
36+
# Install NVIDIA CUDA 11.8 toolkit
37+
RUN wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb && \
38+
dpkg -i cuda-keyring_1.1-1_all.deb && \
39+
apt-get update && \
40+
apt-get install -y cuda-toolkit-11-8
41+
42+
ENV CUDA_HOME=/usr/local/cuda-11.8
43+
ENV PATH=$CUDA_HOME/bin:$PATH
44+
ENV LD_LIBRARY_PATH=$CUDA_HOME/lib64
45+
46+
# Link python to python3
47+
RUN ln -sf /usr/bin/python3 /usr/bin/python
48+
49+
ENV NG_MODEL_GYM_DIR="/home/ng-model-gym"
50+
51+
# Change working directory to ng-model-gym folder
52+
WORKDIR ${NG_MODEL_GYM_DIR}
53+
54+
# Copy Neural Graphics Model Gym folder to container, excluding files from .dockerignore.
55+
COPY . ${NG_MODEL_GYM_DIR}
56+
57+
# Install Python packages from pyproject.toml
58+
RUN python -m pip install -U pip
59+
RUN make install
60+
61+
CMD ["/bin/bash"]

0 commit comments

Comments
 (0)