Skip to content

Commit

Permalink
Dev (#374)
Browse files Browse the repository at this point in the history
Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Julien Nioche <[email protected]>
Co-authored-by: olivier de Meringo <[email protected]>
Co-authored-by: David <[email protected]>
Co-authored-by: Simon Shillaker <[email protected]>
Co-authored-by: Simon Shillaker <[email protected]>
Co-authored-by: ju3ouz4n <[email protected]>
Co-authored-by: Jonathan Perron <[email protected]>
Co-authored-by: Jonathan Perron <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Julien Nioche <[email protected]>
  • Loading branch information
10 people authored Feb 9, 2025
1 parent 35f1161 commit d2b36b2
Show file tree
Hide file tree
Showing 37 changed files with 1,848 additions and 288 deletions.
17 changes: 17 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Ignore git related files
.github/
.gitignore

# Ignore folders not necessary for the docker image
docs/
tests/

# Ignore venv if any
venv/

# Ignore files not necessary for the docker image
CONTRIBUTING.md
*.png
*.json
LICENSE
Makefile
26 changes: 26 additions & 0 deletions .github/workflows/check_markdown_links.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Check Markdown links
run-name: "Check links in documentation"

on:
push:
branches:
- main
paths:
- 'docs/**'

pull_request:
branches:
- main
paths:
- 'docs/**'


jobs:
mkdocs-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: byrnereese/[email protected]
with:
folder-path: 'docs/'
local-only: true
42 changes: 29 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,35 +1,51 @@
ARG PY_VERSION=3.12

#---------------------------------------------------------------------------------------
# Stage 1 → Builder image
#---------------------------------------------------------------------------------------
FROM python:$PY_VERSION-slim AS build-env

ARG VERSION

WORKDIR /app

# Install python deps
RUN python -m pip install --upgrade poetry wheel twine
RUN apt-get update && apt-get install -y --no-install-recommends build-essential \
&& rm -rf /var/lib/apt/lists/*
RUN python -m pip install --no-cache-dir --upgrade poetry wheel twine

# Install project deps
COPY pyproject.toml .
RUN poetry install --with dev
COPY pyproject.toml poetry.lock ./
RUN poetry install --with dev --no-root

# Copy code *after* installing deps to avoid unnecessarily invalidating cache
COPY . .

# Build the project
RUN poetry build
RUN PROJECT_VERSION=$(poetry version -s) && cp /app/dist/boaviztapi-$PROJECT_VERSION.tar.gz ./boaviztapi-$VERSION.tar.gz
RUN pip install boaviztapi-$VERSION.tar.gz && cp $(which uvicorn) /app
RUN PROJECT_VERSION=$(poetry version -s) && \
cp /app/dist/boaviztapi-$PROJECT_VERSION.tar.gz ./boaviztapi-$VERSION.tar.gz

#---------------------------------------------------------------------------------------
# Stage 2 → Runtime image
#---------------------------------------------------------------------------------------
FROM python:$PY_VERSION-slim AS run-env
# Python 3 surrogate unicode handling
# @see https://click.palletsprojects.com/en/7.x/python3/
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8

COPY --from=build-env /app /app
COPY --from=build-env /usr/local/lib/python3.12/site-packages /usr/local/lib/python3.12/site-packages
ENV PYTHONPATH=/usr/local/lib/python3.12/site-packages
ENV LC_ALL=C.UTF-8 \
LANG=C.UTF-8

ARG VERSION
WORKDIR /app

# Copy executable and dependencies
COPY --from=build-env /app/boaviztapi-$VERSION.tar.gz /app/
RUN pip install --no-cache-dir /app/boaviztapi-$VERSION.tar.gz

# Required in main.py
COPY --from=build-env /app/pyproject.toml /usr/local/lib/python3.12/site-packages/boaviztapi/

# Copy uvicorn executable
RUN pip install --no-cache-dir uvicorn

EXPOSE 5000
CMD ["./uvicorn", "boaviztapi.main:app", "--host", "0.0.0.0", "--port", "5000"]
CMD ["uvicorn", "boaviztapi.main:app", "--host", "0.0.0.0", "--port", "5000"]
49 changes: 49 additions & 0 deletions boaviztapi/data/archetypes/cloud/aws.csv
Original file line number Diff line number Diff line change
Expand Up @@ -965,3 +965,52 @@ z1d.6xlarge,24,192,900,0,0,z1d.metal,
db.z1d.12xlarge,48,384,0,0,0,z1d.metal,
z1d.12xlarge,48,384,1800,0,0,z1d.metal,
z1d.metal,48,384,1800,0,0,z1d.metal,
c8g.medium,1,2,0,0,0,c8g.metal-24xl,
c8g.large,2,4,0,0,0,c8g.metal-24xl,
c8g.xlarge,4,8,0,0,0,c8g.metal-24xl,
c8g.2xlarge,8,16,0,0,0,c8g.metal-24xl,
c8g.4xlarge,16,32,0,0,0,c8g.metal-24xl,
c8g.8xlarge,32,64,0,0,0,c8g.metal-24xl,
c8g.12xlarge,48,96,0,0,0,c8g.metal-24xl,
c8g.16xlarge,64,128,0,0,0,c8g.metal-24xl,
c8g.24xlarge,96,192,0,0,0,c8g.metal-24xl,
c8g.metal-24xl,96,192,0,0,0,c8g.metal-24xl,
m8g.medium,1,4,0,0,0,m8g.metal-24xl,
m8g.large,2,8,0,0,0,m8g.metal-24xl,
m8g.xlarge,4,16,0,0,0,m8g.metal-24xl,
m8g.2xlarge,8,32,0,0,0,m8g.metal-24xl,
m8g.4xlarge,16,64,0,0,0,m8g.metal-24xl,
m8g.8xlarge,32,128,0,0,0,m8g.metal-24xl,
m8g.12xlarge,48,192,0,0,0,m8g.metal-24xl,
m8g.16xlarge,64,256,0,0,0,m8g.metal-24xl,
m8g.24xlarge,96,384,0,0,0,m8g.metal-24xl,
m8g.metal-24xl,96,384,0,0,0,m8g.metal-24xl,
r8g.medium,1,8,0,0,0,r8g.metal-24xl,
r8g.large,2,16,0,0,0,r8g.metal-24xl,
r8g.xlarge,4,32,0,0,0,r8g.metal-24xl,
r8g.2xlarge,8,64,0,0,0,r8g.metal-24xl,
r8g.4xlarge,16,128,0,0,0,r8g.metal-24xl,
r8g.8xlarge,32,256,0,0,0,r8g.metal-24xl,
r8g.12xlarge,48,384,0,0,0,r8g.metal-24xl,
r8g.16xlarge,64,512,0,0,0,r8g.metal-24xl,
r8g.24xlarge,96,768,0,0,0,r8g.metal-24xl,
r8g.metal-24xl,96,768,0,0,0,r8g.metal-24xl,
x8g.medium,1,16,0,0,0,x8g.metal-24xl,
x8g.large,2,32,0,0,0,x8g.metal-24xl,
x8g.xlarge,4,64,0,0,0,x8g.metal-24xl,
x8g.2xlarge,8,128,0,0,0,x8g.metal-24xl,
x8g.4xlarge,16,256,0,0,0,x8g.metal-24xl,
x8g.8xlarge,32,512,0,0,0,x8g.metal-24xl,
x8g.12xlarge,48,768,0,0,0,x8g.metal-24xl,
x8g.16xlarge,64,1024,0,0,0,x8g.metal-24xl,
x8g.24xlarge,96,1536,0,0,0,x8g.metal-24xl,
x8g.metal-24xl,96,1536,0,0,0,x8g.metal-24xl,
i8g.large,2,16,468,0,0,i8g.metal-24xl,
i8g.xlarge,4,32,937,0,0,i8g.metal-24xl,
i8g.2xlarge,8,64,1875,0,0,i8g.metal-24xl,
i8g.4xlarge,16,128,3750,0,0,i8g.metal-24xl,
i8g.8xlarge,32,256,7500,0,0,i8g.metal-24xl,
i8g.12xlarge,48,384,11250,0,0,i8g.metal-24xl,
i8g.16xlarge,64,512,15000,0,0,i8g.metal-24xl,
i8g.24xlarge,96,768,22500,0,0,i8g.metal-24xl,
i8g.metal-24xl,96,768,22500,0,0,i8g.metal-24xl,
11 changes: 7 additions & 4 deletions boaviztapi/data/archetypes/server.csv
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,11 @@ scw_pop2hm.base,Scaleway,rack,2,32,,AMD EPYC 7543,128,16,32,2,234,0,0,0,,0,2,0,5
scw_pro2.base,Scaleway,rack,2,32,,AMD EPYC 7543,128,24,32,2,468,0,0,0,,0,2,0,50;0;100,1,52560,0.33;0.2;0.6,
scw_renders.base,Scaleway,rack,2,20,,Intel Xeon Gold 6148,40,12,32,2,3750,0,0,8,Nvidia Tesla P100,24,4,0,50;0;100,1,52560,0.33;0.2;0.6,
scw_stardust1.base,Scaleway,rack,1,16,,AMD EPYC 7281,64,8,32,5,976,0,0,0,,0,2,0,50;0;100,1,52560,0.33;0.2;0.6,
<<<<<<< HEAD
platform_aws_t4g,AWS,rack,1,,,Annapurna Labs Graviton2,,8,32,0,0,0,0,0,,0,2;2;2,2.99;1;5,50;0;100,1,35040,0.33;0.2;0.6,RAM configuration was not verified
=======
platform_aws_t4g,AWS,rack,1,,,Annapurna Labs Graviton2,,8,32,0,0,0,0,0,,0,2;2;2,2.99;1;5,50;0;100,1,52560,0.33;0.2;0.6,RAM configuration was not verified
>>>>>>> main
c8g.metal-24xl,AWS,rack,1,,,Annapurna Labs Graviton4,,12,16,0,0,0,0,0,,0,2;2;2,2.99;1;5,50;0;100,1,52560,0.33;0.2;0.6,
m8g.metal-24xl,AWS,rack,1,,,Annapurna Labs Graviton4,,12,32,0,0,0,0,0,,0,2;2;2,2.99;1;5,50;0;100,1,52560,0.33;0.2;0.6,
r8g.metal-24xl,AWS,rack,1,,,Annapurna Labs Graviton4,,12,64,0,0,0,0,0,,0,2;2;2,2.99;1;5,50;0;100,1,52560,0.33;0.2;0.6,
x8g.metal-24xl,AWS,rack,1,,,Annapurna Labs Graviton4,,12,128,0,0,0,0,0,,0,2;2;2,2.99;1;5,50;0;100,1,52560,0.33;0.2;0.6,
i8g.metal-24xl,AWS,rack,1,,,Annapurna Labs Graviton4,,12,64,6,3750,0,0,0,,0,2;2;2,2.99;1;5,50;0;100,1,52560,0.33;0.2;0.6,
platform_aws_t4g,AWS,rack,1,,,Annapurna Labs Graviton2,,8,32,0,0,0,0,0,,0,2;2;2,2.99;1;5,50;0;100,1,52560,0.33;0.2;0.6,RAM configuration was not verified

5 changes: 4 additions & 1 deletion boaviztapi/data/archetypes/user_terminal.csv
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@ smartwatch-default,peripheral,smartwatch,default,1,,0
box-default,terminal,box,default,1,43800,10;5;20
usb-stick-default,peripheral,usb_stick,default,0.05,43800,0.3;0.12;0.63
external-ssd-default,peripheral,external_ssd,default,0.05,43800,2.5;0.5;5
hdd-default,peripheral,external_hdd,default,0.05,43800,7.75;6.5;9
hdd-default,peripheral,external_hdd,default,0.05,43800,7.75;6.5;9
vr-headset-oled,terminal,vr_headset,oled,0.01,43800,710;710;710
vr-headset-lcd,terminal,vr_headset,lcd,0.01,43800,692;692;692
vr-controller-default,peripheral,vr_controller,default,0.01,43800,7.90;7.90;7.90
2 changes: 2 additions & 0 deletions boaviztapi/data/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ default_usb_stick: "usb-stick-default"
default_external_ssd: "external-ssd-default"
default_external_hdd: "hdd-default"
default_iot_device: "iot-device-default"
default_vr_headset: "vr-headset-lcd"
default_vr_controller: "vr-controller-default"

default_criteria: ["gwp", "adp", "pe"]

Expand Down
11 changes: 10 additions & 1 deletion boaviztapi/data/crowdsourcing/cpu_specs.csv
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ AMD EPYC 7371,Naples,,,,,,,32.0,,,,,,,,AMD,EPYC,https://github.com/cloud-carbon-
AMD EPYC 7373X,Milan-X,EPYC (Zen 3 (Milan)),TSMC,2022-03-22,3.05 GHz,240.0,16.0,32.0,"33,200 million",7.0,8x 81 mm²,416 mm²,12 nm,1064.0,io_die_size (416 mm²) + die_size (8x 81 mm²),AMD,EPYC,https://www.techpowerup.com/cpu-specs/epyc-7373x.c2762
AMD EPYC 73F3,Milan,EPYC (Zen 3 (Milan)),TSMC,2021-03-15,3.5 GHz,240.0,16.0,32.0,"33,200 million",7.0,8x 81 mm²,416 mm²,12 nm,1064.0,io_die_size (416 mm²) + die_size (8x 81 mm²),AMD,EPYC,https://www.techpowerup.com/cpu-specs/epyc-73f3.c2387
AMD EPYC 7401,Naples,,,,,,,48.0,,,,,,,,AMD,EPYC,https://github.com/cloud-carbon-footprint/cloud-carbon-coefficients/tree/main/data
AMD EPYC 7401P,Naples,,,,,,,48.0,,,,,,,,AMD,EPYC,https://github.com/cloud-carbon-footprint/cloud-carbon-coefficients/tree/main/data
AMD EPYC 7401P,Naples,,,,,170.0,,48.0,,,,,,,,AMD,EPYC,https://www.techpowerup.com/cpu-specs/epyc-7401p.c1930
AMD EPYC 7402,Rome,EPYC (Zen 2 (Rome)),TSMC,2019-08-07,2.8 GHz,180.0,24.0,48.0,"3,800 million",7.0,6x 74 mm²,416 mm2,14 nm,860.0,io_die_size (416 mm2) + die_size (6x 74 mm²),AMD,EPYC,https://www.techpowerup.com/cpu-specs/epyc-7402.c2252
AMD EPYC 7402P,Rome,EPYC (Zen 2 (Rome)),TSMC,2019-08-07,2.8 GHz,180.0,24.0,48.0,"3,800 million",7.0,6x 74 mm²,416 mm2,14 nm,860.0,io_die_size (416 mm2) + die_size (6x 74 mm²),AMD,EPYC,https://www.techpowerup.com/cpu-specs/epyc-7402p.c2261
AMD EPYC 7413,Milan,EPYC (Zen 3 (Milan)),TSMC,2021-03-15,2.65 GHz,180.0,24.0,48.0,"16,600 million",7.0,4x 81 mm²,416 mm²,12 nm,740.0,io_die_size (416 mm²) + die_size (4x 81 mm²),AMD,EPYC,https://www.techpowerup.com/cpu-specs/epyc-7413.c2386
Expand Down Expand Up @@ -356,6 +356,14 @@ AMD Ryzen Threadripper PRO 5965WX,Chagall PRO,Ryzen Threadripper (Zen 3 (Chagall
AMD Ryzen Threadripper PRO 5975WX,Chagall PRO,Ryzen Threadripper (Zen 3 (Chagall)),TSMC,2022-03-08,3.6 GHz,280.0,32.0,64.0,"16,600 million",7.0,4x 81 mm²,416 mm²,14 nm,740.0,io_die_size (416 mm²) + die_size (4x 81 mm²),AMD,Ryzen Threadripper PRO,https://www.techpowerup.com/cpu-specs/ryzen-threadripper-pro-5975wx.c2720
AMD Ryzen Threadripper PRO 5995WX,Chagall PRO,Ryzen Threadripper (Zen 3 (Chagall)),TSMC,2022-03-08,2.7 GHz,280.0,64.0,128.0,"33,200 million",7.0,8x 81 mm²,416 mm²,14 nm,1064.0,io_die_size (416 mm²) + die_size (8x 81 mm²),AMD,Ryzen Threadripper PRO,https://www.techpowerup.com/cpu-specs/ryzen-threadripper-pro-5995wx.c2719
Ampere Altra Max M128-30,Mystique,ARM Neoverse N1,TSMC,2022-07-01,3.0 GHz,250.0,128.0,256.0,"54,000 million",7.0,428 mm²,,,428.0,io_die_size () + die_size (428 mm²),Ampere,ARM Neoverse N1,https://d1o0i0v5q5lp8h.cloudfront.net/ampere/live/assets/documents/Altra_Max_Rev_A1_PB_v1.00_20220331.pdf
Apple M1,Tonga,M1,TSMC,2020-11-10,3.2 GHz,20.0,8.0,8.0,"16,000 million",5.0,120 mm²,,,120.0,io_die_size () + die_size (120 mm²),Apple,M1,https://en.wikipedia.org/wiki/Apple_M1
Apple M1 Pro,Jade C-Chop,M1,TSMC,2021-10-18,3.2 GHz,60.0,10.0,10.0,"33,700 million",5.0,245 mm²,,,245.0,io_die_size () + die_size (245 mm²),Apple,M1,https://en.wikipedia.org/wiki/Apple_M1
Apple M1 Max,Jade C-Die,M1,TSMC,2021-10-18,3.2 GHz,90.0,10.0,10.0,"57,000 million",5.0,432 mm²,,,432.0,io_die_size () + die_size (432 mm²),Apple,M1,https://en.wikipedia.org/wiki/Apple_M1
Apple M1 Ultra,Jade 2C-Die,M1,TSMC,2022-03-08,3.2 GHz,120.0,20.0,20.0,"114,000 million",5.0,864 mm²,,,864.0,io_die_size () + die_size (864 mm²),Apple,M1,https://en.wikipedia.org/wiki/Apple_M1
Apple M2,Staten,M2,TSMC,2022-06-06,3.49 GHz,20.0,8.0,8.0,"20,000 million",5.0,150 mm²,,,150.0,io_die_size () + die_size (150 mm²),Apple,M2,https://en.wikipedia.org/wiki/Apple_M2
Apple M2 Pro,Rhodes Chop,M2,TSMC,2023-01-17,3.49 GHz,50.0,10.0,10.0,"40,000 million",5.0,150 mm²,,,150.0,io_die_size () + die_size (150 mm²),Apple,M2,https://en.wikipedia.org/wiki/Apple_M2
Apple M2 Max,Rhodes 1C,M2,TSMC,2023-01-17,3.49 GHz,90.0,12.0,12.0,"67,000 million",5.0,300 mm²,,,300.0,io_die_size () + die_size (300 mm²),Apple,M2,https://en.wikipedia.org/wiki/Apple_M2
Apple M2 Ultra,Rhodes 2C,M2,TSMC,2023-06-05,3.49 GHz,120.0,24.0,24.0,"134,000 million",5.0,570 mm²,,,570.0,io_die_size () + die_size (570 mm²),Apple,M2,https://en.wikipedia.org/wiki/Apple_M2
Intel Atom x7211E,Gracemont,Atom (Alder Lake-N),Intel,2023-01-03,1000 MHz,6.0,2.0,2.0,,10.0,,,,,io_die_size () + die_size (),Intel,Atom x,https://www.techpowerup.com/cpu-specs/atom-x7211e.c3012
Intel Atom x7213E,Gracemont,Atom (Alder Lake-N),Intel,2023-01-03,1700 MHz,6.0,2.0,2.0,,10.0,,,,,io_die_size () + die_size (),Intel,Atom x,https://www.techpowerup.com/cpu-specs/atom-x7213e.c3011
Intel Atom x7425E,Gracemont,Atom (Alder Lake-N),Intel,2023-01-03,1500 MHz,12.0,4.0,4.0,,10.0,,,,,io_die_size () + die_size (),Intel,Atom x,https://www.techpowerup.com/cpu-specs/atom-x7425e.c3013
Expand Down Expand Up @@ -1770,6 +1778,7 @@ Annapurna Labs Graviton,Graviton,,,2018-11-01,2.3 GHz,40.0,16.0,16.0,,,,,,,,Anna
Annapurna Labs Graviton2,Graviton2,,,2019-11-01,2.5 GHz,150.0,64.0,64.0,,,,,,457.0,Value of cpu_manufacture https://en.wikichip.org/wiki/annapurna_labs/alpine/alc12b00,Annapurna Labs,Graviton2,https://docs.google.com/spreadsheets/d/1DqYgQnEDLQVQm5acMAhLgHLD8xXCG9BIrk-_Nv6jF3k/edit#gid=224728652
Annapurna Labs Graviton3,Graviton3,,,2021-11-01,2.6 GHz,220.0,64.0,64.0,,,,,,347.3,Sum of compute and memory controller and PCI controller die https://www.semianalysis.com/p/amazon-graviton-3-uses-chiplets-and,Annapurna Labs,Graviton3,
Annapurna Labs Graviton3E,Graviton3E,,,,2.6 GHz,250.0,64.0,64.0,,,,,,347.3,Sum of compute and memory controller and PCI controller die https://www.semianalysis.com/p/amazon-graviton-3-uses-chiplets-and,Annapurna Labs,Graviton3,
Annapurna Labs Graviton4,Graviton4,,,2023-11-01,2.8 GHz,300,96,96,95000,,,,,347.3,Assume same as previous generation,Annapurna Labs,Graviton3,"https://www.nextplatform.com/2023/11/28/aws-adopts-arm-v2-cores-for-expansive-graviton4-server-cpu/;Exluding the 48xl instances which have slightly different characteristics (lower freq and 96 cores x 2-socket) those could be added later on. we are estimating 300. This is an assumption based on the incremental TDP increases in the earlier Grav models and the fact that other processors with the same clock speed and number of cores generally run at 360. We lowered this to 300 to avoid overestimating. We also assume the die size of 347.3 mm² - the same as the Grav3 - because AWS didn't announce anything about reduction in die size in their Grav4 press releases"
Intel Core i7-8700B,Coffee Lake,Core i7 (Coffee Lake),Intel,2018-04-03,3.2 GHz,65.0,6.0,12.0,,14.0,154 mm²,,,154.0,io_die_size () + die_size (154 mm²),Intel,Core i7,https://www.techpowerup.com/cpu-specs/core-i7-8700b.c2895
Intel Xeon E5-2651 V2,Ivy Bridge,,,,,95.0,12.0,24.0,,,,,,432.2,Linear regression of cpu_manufacture,Intel,Xeon E5,https://docs.google.com/spreadsheets/d/1DqYgQnEDLQVQm5acMAhLgHLD8xXCG9BIrk-_Nv6jF3k/edit#gid=224728652
Intel Xeon E5-2665,Sandy Bridge,,,,,115.0,8.0,16.0,,,,,,350.0,Linear regression of cpu_manufacture,Intel,Xeon E5,https://docs.google.com/spreadsheets/d/1DqYgQnEDLQVQm5acMAhLgHLD8xXCG9BIrk-_Nv6jF3k/edit#gid=224728652
Expand Down
Loading

0 comments on commit d2b36b2

Please sign in to comment.