Skip to content

Commit 59feab4

Browse files
Merge branch 'NVIDIA:main' into maarten-clinical-triage-workflow
2 parents f616a20 + 4b38c86 commit 59feab4

File tree

176 files changed

+55597
-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.

176 files changed

+55597
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
.git
2+
.gitignore
3+
.venv
4+
dataset/
5+
sim_agent/.venv/
6+
workflow_agent/.venv/
7+
**/__pycache__/
8+
**/*.pyc
9+
**/.pytest_cache/
10+
**/.mypy_cache/
11+
**/.ruff_cache/
12+
**/.DS_Store
13+
**/*.ipynb_checkpoints
14+
sim_agent/chroma_db/
15+
sim_agent/volumes/

industries/energy/simulation-workflow-agent/.gitattributes

Whitespace-only changes.
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# Python
2+
__pycache__/
3+
pdf2png/
4+
png2txt/
5+
processed_png2txt_list.md
6+
*.py[cod]
7+
*$py.class
8+
*.so
9+
.Python
10+
env/
11+
venv/
12+
.venv/
13+
**/.venv.clean/
14+
ENV/
15+
build/
16+
develop-eggs/
17+
dist/
18+
downloads/
19+
eggs/
20+
.eggs/
21+
lib/
22+
lib64/
23+
parts/
24+
sdist/
25+
var/
26+
wheels/
27+
*.egg-info/
28+
.installed.cfg
29+
.processed_txt_files.md
30+
*.egg
31+
32+
# IDEs
33+
.vscode/
34+
.idea/
35+
*.swp
36+
*.swo
37+
*~
38+
.DS_Store
39+
40+
# Testing
41+
tests/
42+
.pytest_cache/
43+
.coverage
44+
htmlcov/
45+
*.cover
46+
# test_*.py
47+
debug_*.py
48+
49+
# Docker volumes and runtime data
50+
volumes/
51+
sim_agent/volumes/
52+
53+
# Etcd data
54+
**/etcd/
55+
56+
# Logs
57+
*.log
58+
**/logs/
59+
60+
# Environment files
61+
.env
62+
.env.local
63+
64+
# Temporary files
65+
tmp/
66+
temp/
67+
*.tmp
68+
69+
# Vector databases
70+
*.db
71+
*.index
72+
chroma/
73+
chroma_db/
74+
# volumes/milvus (runtime data) covered by volumes/ above
75+
76+
# Output and cache
77+
test_output/
78+
output/
79+
workflow_agent/experiments/
80+
81+
# Optimization: generated simulation dirs (dataset/CASE/CASE_RUN.sim/)
82+
**/*.sim/
83+
84+
# Flow diagnostics output
85+
**/*.fdout/
86+
87+
# Example cases - generated outputs
88+
ressim_agent/data/example_cases/SPE10/**/*.RSM
89+
ressim_agent/data/example_cases/SPE10/**/*_AGENT_GENERATED.DATA
90+
ressim_agent/data/example_cases/SPE10/**/plot_*.png
91+
ressim_agent/data/example_cases/SPE10/**/*_FIXED.DATA
92+
93+
*.DBG
94+
*.EGRID
95+
*.INIT
96+
*.PRT
97+
*.SMSPEC
98+
*.UNRST
99+
*.UNSMRY
100+
101+
# Knowledge base - large files (downloaded via download_required.sh)
102+
ressim_agent/data/knowledge_base/papers/*.pdf
103+
ressim_agent/data/knowledge_base/papers/.ocr_OPM_Flow_Reference_Manual_2025-10/txts/
104+
ressim_agent/data/knowledge_base/repos/
105+
sim_agent/data/knowledge_base/repos/
106+
data/knowledge_base/repos/
107+
ressim_agent/data/knowledge_base/examples
108+
workflow_agent/knowledge_base/manuals/*.pdf
109+
workflow_agent/workflow/dataset/**/*.GRDECL
110+
dataset/**/*.GRDECL
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Unified simulation-agent image: orchestration, ressim, and workflow agents.
2+
# Build from repo root: docker build -f Dockerfile -t simulation-agent:latest .
3+
#
4+
# Reuses the same base and patterns as sim_agent/Dockerfile and workflow_agent/Dockerfile.
5+
6+
FROM ubuntu:24.04
7+
8+
# License notes:
9+
# Application code: Apache-2.0
10+
# OPM Flow binaries (libopm-simulators*): GPL-3.0-or-later — bundled as a
11+
# standalone external executable invoked via subprocess; not linked into the
12+
# application. GPL does not propagate across the process boundary.
13+
# See /usr/share/licenses/opm/NOTICE.txt (in image) for source offer.
14+
LABEL org.opencontainers.image.licenses="Apache-2.0 AND GPL-3.0-or-later"
15+
16+
ENV DEBIAN_FRONTEND=noninteractive
17+
ENV PYTHONUNBUFFERED=1
18+
ENV PIP_PREFER_BINARY=1
19+
20+
WORKDIR /workspace
21+
22+
# System deps: PDF parsing, OPM Flow (shared by ressim and workflow)
23+
RUN apt-get update && apt-get install -y --no-install-recommends \
24+
software-properties-common \
25+
gnupg \
26+
git \
27+
wget \
28+
curl \
29+
ca-certificates \
30+
build-essential \
31+
poppler-utils \
32+
python3 \
33+
python3-venv \
34+
python3-dev \
35+
python3-pip \
36+
&& add-apt-repository ppa:opm/ppa \
37+
&& apt-get update \
38+
&& apt-get install -y --no-install-recommends \
39+
libopm-simulators-bin \
40+
libopm-simulators \
41+
&& rm -rf /var/lib/apt/lists/*
42+
43+
# GPL-3.0 compliance: embed notice and source pointer for OPM binaries
44+
COPY LICENSES/OPM-GPL3-NOTICE.txt /usr/share/licenses/opm/NOTICE.txt
45+
46+
# Copy all agent components (order for layer caching: least-changed first)
47+
COPY config /workspace/config
48+
COPY llm_provider /workspace/llm_provider
49+
COPY orchestration_agent /workspace/orchestration_agent
50+
COPY sim_agent /workspace/sim_agent
51+
COPY workflow_agent /workspace/workflow_agent
52+
53+
# Install sim_agent (provides LangChain, LangGraph, openai, OPM tools)
54+
WORKDIR /workspace/sim_agent
55+
RUN python3 -m venv /opt/venv && \
56+
/opt/venv/bin/pip install --upgrade pip && \
57+
/opt/venv/bin/pip install --only-binary=:all: grpcio && \
58+
/opt/venv/bin/pip install -e ".[rag,analysis,flow_diagnostics]" && \
59+
/opt/venv/bin/pip install openai
60+
61+
# Install workflow_agent (optimization deps + agentic)
62+
WORKDIR /workspace/workflow_agent
63+
RUN /opt/venv/bin/pip install -r workflow/optimization/requirements.txt && \
64+
/opt/venv/bin/pip install -e .
65+
66+
ENV PATH="/opt/venv/bin:$PATH"
67+
68+
# OPM_FLOW_EXTRA_ARGS wrapper (e.g. --CheckSatfuncConsistency=0)
69+
RUN echo '' >> /root/.bashrc && \
70+
echo 'flow() { command flow "$@" $OPM_FLOW_EXTRA_ARGS; }' >> /root/.bashrc
71+
72+
WORKDIR /workspace
73+
74+
# Default: run orchestration (interactive ressim chat)
75+
CMD ["python", "-m", "orchestration_agent", "--interactive"]
Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
Apache License
2+
Version 2.0, January 2004
3+
http://www.apache.org/licenses/
4+
5+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6+
7+
1. Definitions.
8+
9+
"License" shall mean the terms and conditions for use, reproduction,
10+
and distribution as defined by Sections 1 through 9 of this document.
11+
12+
"Licensor" shall mean the copyright owner or entity authorized by
13+
the copyright owner that is granting the License.
14+
15+
"Legal Entity" shall mean the union of the acting entity and all
16+
other entities that control, are controlled by, or are under common
17+
control with that entity. For the purposes of this definition,
18+
"control" means (i) the power, direct or indirect, to cause the
19+
direction or management of such entity, whether by contract or
20+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
21+
outstanding shares, or (iii) beneficial ownership of such entity.
22+
23+
"You" (or "Your") shall mean an individual or Legal Entity
24+
exercising permissions granted by this License.
25+
26+
"Source" form shall mean the preferred form for making modifications,
27+
including but not limited to software source code, documentation
28+
source, and configuration files.
29+
30+
"Object" form shall mean any form resulting from mechanical
31+
transformation or translation of a Source form, including but
32+
not limited to compiled object code, generated documentation,
33+
and conversions to other media types.
34+
35+
"Work" shall mean the work of authorship made available under
36+
the License, as indicated by a copyright notice that is included in
37+
or attached to the work (an example is provided in the Appendix below).
38+
39+
"Derivative Works" shall mean any work, whether in Source or Object
40+
form, that is based on (or derived from) the Work and for which the
41+
editorial revisions, annotations, elaborations, or other modifications
42+
represent, as a whole, an original work of authorship. For the purposes
43+
of this License, Derivative Works shall not include works that remain
44+
separable from, or merely link (or bind by name) to the interfaces of,
45+
the Work and Derivative Works thereof.
46+
47+
"Contribution" shall mean, as defined by the copyright owner or by
48+
"Contributions" shall mean, as defined by the copyright owner or by
49+
Legal Entity authorized to submit on behalf of the copyright owner, any
50+
work of authorship, including the original version of the Work and any
51+
modifications or additions to that Work or Derivative Works of the Work.
52+
53+
"Contributor" shall mean Licensor and any Legal Entity on behalf of
54+
whom a Contribution has been received by the Licensor and subsequently
55+
incorporated within the Work.
56+
57+
2. Grant of Copyright License. Subject to the terms and conditions of
58+
this License, each Contributor hereby grants to You a perpetual,
59+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
60+
copyright license to reproduce, prepare Derivative Works of,
61+
publicly display, publicly perform, sublicense, and distribute the
62+
Work and such Derivative Works in Source or Object form.
63+
64+
3. Grant of Patent License. Subject to the terms and conditions of
65+
this License, each Contributor hereby grants to You a perpetual,
66+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
67+
(except as stated in this section) patent license to make, have made,
68+
use, offer to sell, sell, import, and otherwise transfer the Work,
69+
where such license applies only to those patent claims licensable
70+
by such Contributor that are necessarily infringed by their
71+
Contribution(s) alone or by combination of their Contribution(s)
72+
with the Work to which such Contribution(s) was submitted. If You
73+
institute patent litigation against any entity (including a cross-claim
74+
or counterclaim in a lawsuit) alleging that the Work or any
75+
Contribution embodied within the Work constitutes direct or contributory
76+
patent infringement, then any patent licenses granted to You under
77+
this License for that Work shall terminate as of the date such
78+
litigation is filed.
79+
80+
4. Redistribution. You may reproduce and distribute copies of the
81+
Work or Derivative Works thereof in any medium, with or without
82+
modifications, and in Source or Object form, provided that You
83+
meet the following conditions:
84+
85+
(a) You must give any other recipients of the Work or Derivative
86+
Works a copy of this License; and
87+
88+
(b) You must cause any modified files to carry prominent notices
89+
stating that You changed the files; and
90+
91+
(c) You must retain, in the Source form of any Derivative Works
92+
that You distribute, all copyright, patent, trademark, and
93+
attribution notices from the Source form of the Work,
94+
excluding those notices that do not pertain to any part of
95+
the Derivative Works; and
96+
97+
(d) If the Work includes a "NOTICE" text file as part of its
98+
distribution, You must include a readable copy of the
99+
attribution notices contained within such NOTICE file, in
100+
at least one of the following places: within a NOTICE text
101+
file distributed as part of the Derivative Works; within
102+
the Source form or documentation, if provided along with the
103+
Derivative Works; or, within a display generated by the
104+
Derivative Works, if and wherever such third-party notices
105+
normally appear. The contents of the NOTICE file are for
106+
informational purposes only and do not modify the License.
107+
You may add Your own attribution notices within Derivative
108+
Works that You distribute, alongside or as an addendum to
109+
the NOTICE text from the Work, provided that such additional
110+
attribution notices cannot be construed as modifying the License.
111+
112+
You may add Your own license statement for Your modifications and
113+
may provide additional grant of rights to use, modify, or distribute
114+
those modifications.
115+
116+
5. Submission of Contributions. Unless You explicitly state otherwise,
117+
any Contribution intentionally submitted for inclusion in the Work
118+
by You to the Licensor shall be under the terms and conditions of
119+
this License, without any additional terms or conditions.
120+
Notwithstanding the above, nothing herein shall supersede or modify
121+
the terms of any separate license agreement you may have executed
122+
with Licensor regarding such Contributions.
123+
124+
6. Trademarks. This License does not grant permission to use the trade
125+
names, trademarks, service marks, or product names of the Licensor,
126+
except as required for reasonable and customary use in describing the
127+
origin of the Work and reproducing the content of the NOTICE file.
128+
129+
7. Disclaimer of Warranty. Unless required by applicable law or
130+
agreed to in writing, Licensor provides the Work (and each
131+
Contributor provides its Contributions) on an "AS IS" BASIS,
132+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
133+
implied, including, without limitation, any warranties or conditions
134+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
135+
PARTICULAR PURPOSE. You are solely responsible for determining the
136+
appropriateness of using or reproducing the Work and assume any
137+
risks associated with Your exercise of permissions under this License.
138+
139+
8. Limitation of Liability. In no event and under no legal theory,
140+
whether in tort (including negligence), contract, or otherwise,
141+
unless required by applicable law (such as deliberate and grossly
142+
negligent acts) or agreed to in writing, shall any Contributor be
143+
liable to You for damages, including any direct, indirect, special,
144+
incidental, or exemplary damages of any character arising as a
145+
result of this License or out of the use or inability to use the
146+
Work (including but not limited to damages for loss of goodwill,
147+
work stoppage, computer failure or malfunction, or all other
148+
commercial damages or losses), even if such Contributor has been
149+
advised of the possibility of such damages.
150+
151+
9. Accepting Warranty or Liability. While redistributing the Work or
152+
Derivative Works thereof, You may choose to offer, and charge a fee
153+
for, acceptance of support, warranty, indemnity, or other liability
154+
obligations and/or rights consistent with this License. However, in
155+
accepting such obligations, You may offer such obligations only on
156+
Your own behalf and on Your sole responsibility, not on behalf of
157+
any other Contributor, and only if You agree to indemnify, defend,
158+
and hold each Contributor harmless for any liability incurred by,
159+
or claims asserted against, such Contributor by reason of your
160+
accepting any such warranty or additional liability.
161+
162+
END OF TERMS AND CONDITIONS
163+
164+
APPENDIX: How to apply the Apache License to your work.
165+
166+
To apply the Apache License to your work, attach the following
167+
boilerplate notice, with the fields enclosed by brackets "[]"
168+
replaced with your own identifying information. (Don't include
169+
the brackets!) The text should be enclosed in the appropriate
170+
comment syntax for the format in question.
171+
172+
Copyright [yyyy] [name of copyright owner]
173+
174+
Licensed under the Apache License, Version 2.0 (the "License");
175+
you may not use this file except in compliance with the License.
176+
You may obtain a copy of the License at
177+
178+
http://www.apache.org/licenses/LICENSE-2.0
179+
180+
Unless required by applicable law or agreed to in writing, software
181+
distributed under the License is distributed on an "AS IS" BASIS,
182+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
183+
See the License for the specific language governing permissions and
184+
limitations under the License.

0 commit comments

Comments
 (0)