Skip to content

Commit 7cd25b5

Browse files
snadrusmagik6krvagg
authored
Mainlining of Fast Snap logic (#804)
* supra: file tree_r ffi * wire up treerfile to go * supra: using the correct node reader in file tree_r ffi * tree_r links * redefs, it works * missing test-supra cmd * fast snap encode * encode-snap test * wire up fast-snap * make gen * encode works * fix: yield in PSClientPoll correctly * faster webui history * pspoll: Don't timeout the context * fix EpochPretty ddos * more robust dealdata * robusthttp metrics * enable is done this way round * pshare: prio snap * encode bind to data * make gen * piecepark node dl limit * only park pieces locally when supra P2 isn't running * fix commp canaccept * fix build * fix commp canaccept storage query * aaaargh * prevent dupe piece park task * expose piecepark min free pct * Do snap falloc * Cache storage info in localstorage.Local calls for a bit * MoveStorage / UpgradeStore param tweaks * snap key no read * snap: Parallel movestorage * snap mertics, ui fix * missing snap metrics * fix snap batch backoff * somewhat handle snap msg fails on immutable deadline * fix snap retry query params * storage: Copy over snap vproof * treeR file deadline * slower retry movestorage * ipni: Handle orphan tasks * ipni: Accept orphans * f05 bmgr * f05 bmgr fixes * fix f05 bm build * make gen * missing fixes postrebase * fix: proofshare: Fix client payment chain bootstrap * feat: test post cli: Vanilla Proof test command * supra: live duration-so-far metric * webui: Content page * fix: Make kubo retrievals work (#724) * fix(retrieval): handle pathed IPFS retrieval style, add basic retrieval tests (#720) * ipni: Announce addresses with port * update lotus * make gen --------- Co-authored-by: Rod Vagg <rod@vagg.org> * add more caches * more metrics, less log spam * http method in req stats * http metric for in-flight requests * remotebs: return correct err on not-found * limit parallel retrievals * separate head req limiter * fix race condition that resulted in ignoring the last bit of cached data. * merge iffy * gen * lint and tests * old linter making mistakes * linty * fixes * oops * agent review fixes * cuda13 capable ffi * supra: allow passing march flag * Unified Snap (#806) * build * 2 * 3 * build gotchas * right shape * requirements include cuda * get build fixed * cuda for everyone * add golang for ci * stop deleting my stuff * try with gcc flag * auto-nvme-setup opt-out * ci build fix attempt * fix outdated base image * gofmt, flag- no avx512bf16 * try cuda setup * do like working job * try without cuda * try cude in install-deps * cuda info in github env * make spdk happy * deps * gcc12 * ubuntu-latest is not 2404 but 2004 * ci: missing deps, fix ubuntus * supra: rm mbx wrapper, fix poseidon constants wait, native default arch * review fixes --------- Co-authored-by: Łukasz Magiera <magik6k@gmail.com> * version and dep * dl v1 * missing market miners onchange initial setup * test supra system-info command * supra: add missing pc2_hash_files template instantiations * supra: correct -march in pc2.cu to make blst not segfault * cache supraseal * fix: storage: Make declare usably fast * sectormetadata: Recheck partition presence * debug expmgr * expmgr: Never try to extend dead sectors * use our runners * Trying to fix CI * fixing CI * indexing: gracefully handle no-unsealed-copy pieces * solve CI lint errors * CI cleanups * CI: export regex * test_env_vars * cgo fix * paux in fallback flow * gen * cuda probe without nvcc * env to disable snap supra * fix generic crosscompile, explicit native target * gcc 13 for supra * supra docs * address review * fix itests --------- Co-authored-by: Łukasz Magiera <magik6k@gmail.com> Co-authored-by: Łukasz Magiera <magik6k@users.noreply.github.com> Co-authored-by: Rod Vagg <rod@vagg.org>
1 parent 0416bb0 commit 7cd25b5

File tree

111 files changed

+6584
-2489
lines changed

Some content is hidden

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

111 files changed

+6584
-2489
lines changed
Lines changed: 74 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,90 @@
11
name: 'Install Dependencies'
2-
description: 'Install common dependencies'
2+
description: 'Install common dependencies including CUDA for supraseal linking'
33

44
runs:
55
using: 'composite'
66
steps:
77
- name: Install dependencies
88
run: |
9-
sudo apt-get install -y curl ca-certificates gnupg ocl-icd-opencl-dev libhwloc-dev
9+
sudo apt-get update
10+
sudo apt-get install -y \
11+
build-essential \
12+
gcc-13 g++-13 \
13+
pkg-config \
14+
autoconf automake libtool \
15+
curl wget git \
16+
ca-certificates gnupg \
17+
python3 python3-pip python3-dev python3-venv \
18+
xxd nasm \
19+
ocl-icd-opencl-dev libhwloc-dev \
20+
libfuse3-dev uuid-dev libssl-dev libnuma-dev libaio-dev libarchive-dev libkeyutils-dev libncurses-dev \
21+
libgmp-dev libconfig++-dev
1022
shell: bash
1123

12-
- name: Fetch all tags
13-
run: git fetch --all
24+
- name: Set up GCC 13 as default
25+
run: |
26+
sudo update-alternatives --remove-all gcc 2>/dev/null || true
27+
sudo update-alternatives --remove-all g++ 2>/dev/null || true
28+
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100
29+
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 100
30+
echo "CC=gcc-13" >> $GITHUB_ENV
31+
echo "CXX=g++-13" >> $GITHUB_ENV
32+
shell: bash
33+
34+
- name: Install CUDA Toolkit
35+
run: |
36+
if [ -f "/usr/local/cuda/bin/nvcc" ]; then
37+
echo "CUDA already installed"
38+
exit 0
39+
fi
40+
wget -q https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb
41+
sudo dpkg -i cuda-keyring_1.1-1_all.deb
42+
rm cuda-keyring_1.1-1_all.deb
43+
sudo apt-get update
44+
sudo apt-get -y install cuda-toolkit
45+
shell: bash
46+
47+
- name: Set up CUDA environment
48+
run: |
49+
echo "/usr/local/cuda/bin" >> $GITHUB_PATH
50+
echo "CUDA_HOME=/usr/local/cuda" >> $GITHUB_ENV
51+
# Set up CUDA stubs for linking without GPU
52+
STUBS="/usr/local/cuda/lib64/stubs"
53+
if [ -d "$STUBS" ]; then
54+
sudo ln -sf "$STUBS/libcuda.so" "$STUBS/libcuda.so.1" 2>/dev/null || true
55+
echo "LD_LIBRARY_PATH=$STUBS:/usr/local/cuda/lib64" >> $GITHUB_ENV
56+
echo "LIBRARY_PATH=$STUBS:/usr/local/cuda/lib64" >> $GITHUB_ENV
57+
fi
58+
shell: bash
59+
60+
# NOTE: CI sometimes flakes on large/full fetches (HTTP/2 early EOF).
61+
# We only need tags (and only from origin) for versioning/metadata, so keep
62+
# this fetch minimal and retry with HTTP/1.1.
63+
- name: Fetch tags (resilient)
64+
run: |
65+
set -euo pipefail
66+
git config --global http.version HTTP/1.1
67+
git config --global http.postBuffer 524288000 || true
68+
69+
# Fetch only from origin (if present) and only tags; retry on transient network errors.
70+
tries=0
71+
until [ "$tries" -ge 4 ]; do
72+
tries=$((tries+1))
73+
if git fetch origin --tags --force --prune --no-recurse-submodules; then
74+
exit 0
75+
fi
76+
echo "git fetch failed (attempt $tries/4), retrying in $((tries*5))s..." >&2
77+
sleep $((tries*5))
78+
done
79+
echo "git fetch failed after 4 attempts" >&2
80+
exit 1
1481
shell: bash
1582

1683
- name: Sync submodules
1784
run: git submodule sync
1885
shell: bash
1986

2087
- name: Update submodules
21-
run: git submodule update --init
22-
shell: bash
88+
run: git submodule update --init --recursive
89+
shell: bash
90+

.github/actions/setup-go/action.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

.github/image/Dockerfile

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,26 +26,39 @@ RUN go mod download
2626
FROM ghcr.io/filecoin-shipyard/lotus-containers:lotus-v1.34.0-rc2-devnet AS lotus-test
2727

2828
# Stage 3: Build the final image
29-
FROM myoung34/github-runner:ubuntu-noble AS curio-github-runner
29+
FROM myoung34/github-runner:ubuntu-24.04 AS curio-github-runner
3030

3131
# Copy Go dependencies from the builder stage
3232
COPY --from=builder /go/pkg /go/pkg
3333
COPY --from=builder /go/bin /go/bin
3434
COPY --from=lotus-test /usr/local/bin/lotus /usr/local/bin/
3535

36-
RUN apt update && apt install -y \
36+
RUN apt-get update && apt-get install -y \
3737
build-essential \
38-
bzr pkg-config \
38+
gcc-13 g++-13 \
39+
pkg-config \
40+
autoconf automake libtool \
3941
clang \
40-
curl \
41-
git \
42-
hwloc \
42+
curl wget git \
43+
ca-certificates gnupg \
44+
python3 python3-pip python3-dev python3-venv \
45+
xxd \
46+
nasm \
47+
hwloc libhwloc-dev \
4348
jq \
44-
libhwloc-dev wget \
4549
mesa-opencl-icd \
4650
ocl-icd-opencl-dev \
47-
gcc-12 g++-12 \
48-
ca-certificates gnupg
51+
libfuse3-dev uuid-dev libssl-dev libnuma-dev libaio-dev libarchive-dev libkeyutils-dev libncurses-dev \
52+
libgmp-dev libconfig++-dev gcc-13 g++-13 \
53+
ca-certificates gnupg \
54+
&& apt-get clean \
55+
&& rm -rf /var/lib/apt/lists/*
56+
57+
# Set up GCC 13 as default
58+
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100 \
59+
&& update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 100 \
60+
&& update-alternatives --set gcc /usr/bin/gcc-13 \
61+
&& update-alternatives --set g++ /usr/bin/g++-13
4962

5063
ENV RUSTUP_HOME=/usr/local/rustup \
5164
CARGO_HOME=/usr/local/cargo \

.github/workflows/Dockerfile.supraseal-test

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@
44
FROM ubuntu:24.04
55

66
ENV DEBIAN_FRONTEND=noninteractive
7-
ENV CUDA_VERSION=13.0
8-
ENV GCC_VERSION=12
7+
ENV GCC_VERSION=13
98

109
# Install system dependencies
1110
RUN apt-get update && apt-get install -y \
1211
build-essential \
13-
gcc-12 g++-12 \
12+
gcc-13 g++-13 \
1413
nasm \
1514
pkg-config \
1615
autoconf automake libtool \
@@ -30,11 +29,11 @@ RUN apt-get update && apt-get install -y \
3029
python3-venv \
3130
&& rm -rf /var/lib/apt/lists/*
3231

33-
# Set up GCC 12 as default
34-
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100 && \
35-
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 100 && \
36-
update-alternatives --set gcc /usr/bin/gcc-12 && \
37-
update-alternatives --set g++ /usr/bin/g++-12
32+
# Set up GCC 13 as default
33+
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100 && \
34+
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 100 && \
35+
update-alternatives --set gcc /usr/bin/gcc-13 && \
36+
update-alternatives --set g++ /usr/bin/g++-13
3837

3938
# Install CUDA Toolkit from NVIDIA Repository
4039
# Source: https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=24.04&target_type=deb_local
@@ -43,14 +42,22 @@ RUN wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86
4342
rm cuda-keyring_1.1-1_all.deb && \
4443
apt-get update && \
4544
apt-get -y install cuda-toolkit && \
46-
ln -sf /usr/local/cuda /usr/local/cuda-13.0 && \
4745
rm -rf /var/lib/apt/lists/*
4846

49-
# Set up CUDA environment
47+
# Set up CUDA environment and verify installation
5048
ENV PATH=/usr/local/cuda/bin:${PATH}
5149
ENV CUDA_HOME=/usr/local/cuda
5250
ENV LD_LIBRARY_PATH=/usr/local/cuda/lib64
5351

52+
# Verify CUDA installation and version
53+
RUN nvcc --version && \
54+
CUDA_VERSION=$(nvcc --version | grep "release" | sed -n 's/.*release \([0-9]*\)\.\([0-9]*\).*/\1/p') && \
55+
echo "Installed CUDA version: $CUDA_VERSION" && \
56+
if [ "$CUDA_VERSION" -lt 12 ]; then \
57+
echo "ERROR: CUDA $CUDA_VERSION is too old. Need CUDA 12 or newer."; \
58+
exit 1; \
59+
fi
60+
5461
# Set working directory
5562
WORKDIR /workspace
5663

.github/workflows/README.supraseal-testing.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ If you prefer to test without Docker on Ubuntu 24.04:
7575
```bash
7676
# Install dependencies (requires sudo)
7777
sudo apt-get update && sudo apt-get install -y \
78-
build-essential gcc-12 g++-12 nasm pkg-config \
78+
build-essential gcc-13 g++-13 nasm pkg-config \
7979
autoconf automake libtool libssl-dev libnuma-dev \
8080
uuid-dev libaio-dev libfuse3-dev libarchive-dev \
8181
libkeyutils-dev libncurses-dev python3 python3-pip \
@@ -84,9 +84,9 @@ sudo apt-get update && sudo apt-get install -y \
8484
# Install Python tools
8585
pip3 install --break-system-packages meson ninja pyelftools
8686

87-
# Set GCC 12 as default
88-
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100
89-
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 100
87+
# Set GCC 13 as default
88+
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100
89+
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 100
9090

9191
# Build
9292
cd extern/supraseal

0 commit comments

Comments
 (0)