Repository navigation
Add an FFW build to the container #175
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,10 +1,14 @@ | ||||||||||||||||||||||
| # Pin to a specific ROSS and CODES commits for reproducible builds. | ||||||||||||||||||||||
| ARG ROSS_GIT_REF=dc3a6a056cfc7a5e68f7141f88d8833407599ef8 | ||||||||||||||||||||||
| ARG CODES_GIT_REF=a5958cfaee6dcc73a98d084005e3412da773fb35 | ||||||||||||||||||||||
| # PIN to a specific CODES Branch for FFW | ||||||||||||||||||||||
| # This points to a forked repo and should be updated/removed when merged into CODES proper | ||||||||||||||||||||||
| ARG FFW_GIT_REF=13acd9cbbd57efa80ff073b1826f3a0b9f49922d | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| FROM ubuntu:24.04 AS ross-builder | ||||||||||||||||||||||
| ARG ROSS_GIT_REF | ||||||||||||||||||||||
| ARG CODES_GIT_REF | ||||||||||||||||||||||
| ARG FFW_GIT_REF | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| RUN apt-get update && apt-get install -y --no-install-recommends \ | ||||||||||||||||||||||
| ca-certificates git \ | ||||||||||||||||||||||
|
|
@@ -55,6 +59,19 @@ RUN cmake -S /opt/codes -B /opt/codes/build \ | |||||||||||||||||||||
| && cmake --build opt/codes/build \ | ||||||||||||||||||||||
| && cmake --install opt/codes/build/ | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # TODO: Points to forked repo and should be changed/removed when merged | ||||||||||||||||||||||
| RUN git clone https://github.com/caitlinross/codes.git opt/FFW \ | ||||||||||||||||||||||
| && cd opt/FFW \ | ||||||||||||||||||||||
| && git checkout "${FFW_GIT_REF}" \ | ||||||||||||||||||||||
| && git submodule update --init --recursive | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| RUN cmake -S opt/FFW -B opt/FFW/build/local \ | ||||||||||||||||||||||
| -DROSS_DIR=/ross/install/lib \ | ||||||||||||||||||||||
| && cmake --build opt/FFW/build/local -j"$(nproc)" \ | ||||||||||||||||||||||
| --target model-net-fluid-flow-wan-random-traffic \ | ||||||||||||||||||||||
| model-net-fluid-flow-wan-trace-traffic | ||||||||||||||||||||||
|
Comment on lines
+68
to
+72
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| FROM mcr.microsoft.com/devcontainers/base:ubuntu-24.04 | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # Declared (empty by default) so the LD_LIBRARY_PATH append below references a | ||||||||||||||||||||||
|
|
@@ -75,6 +92,8 @@ ENV PATH=/opt/mpich/bin:$PATH \ | |||||||||||||||||||||
| # of relying on a host `ross` checkout bind-mounted at runtime. | ||||||||||||||||||||||
| COPY --from=ross-builder --chown=vscode:vscode /ross/build/models/phold/phold /opt/ross/phold | ||||||||||||||||||||||
| COPY --from=ross-builder --chown=vscode:vscode /opt/codes /opt/codes | ||||||||||||||||||||||
| # TODO: This may change once the FFW changes land in the main repo | ||||||||||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we add a short comment here about why we are copying everything over instead of just a subset of the repo? We may want to also consider an issue to come back to this and determine if we can determine the minimal requirements and copy those only. |
||||||||||||||||||||||
| COPY --from=ross-builder --chown=vscode:vscode /opt/FFW /opt/FFW | ||||||||||||||||||||||
| # Ensure Python output appears immediately in container logs. | ||||||||||||||||||||||
| ENV PYTHONUNBUFFERED=1 | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # Generated by Django 6.0.6 on 2026-09-26 17:42 | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| from django.db import migrations, models | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
| dependencies = [ | ||
| ("core", "0012_alter_pholdsimulationconfig_lookahead"), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.AddField( | ||
| model_name="run", | ||
| name="simulation_type", | ||
| field=models.CharField( | ||
| choices=[("esnet", "ESnet"), ("phold", "PHOLD"), ("ffw", "FFW")], | ||
| default="esnet", | ||
| max_length=32, | ||
| ), | ||
| ), | ||
| ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets use an absolute path here to avoid potential issues if
WORKDIRever changes.