Skip to content

Commit a507a88

Browse files
author
User
committed
revert: restore setup.sh + README to pre-modification state; remove release.yml (vramhub-validator CI publishes here)
1 parent 4584fe1 commit a507a88

2 files changed

Lines changed: 22 additions & 85 deletions

File tree

.github/workflows/release.yml

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

setup.sh

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,9 @@ ENCLAVE_CID="${ENCLAVE_CID:-16}"
3636
ENCLAVE_DEBUG="${ENCLAVE_DEBUG:-false}"
3737
SKIP_REGISTER="${SKIP_REGISTER:-false}"
3838
VRAM_REPO="${VRAM_REPO:-VRAM-AI/vram-validator}"
39-
VRAMHUB_REPO="VRAM-AI/VRAM-HUB"
4039
INSTALL_DIR=/opt/vram
4140
BUILD_DIR=/tmp/vram-setup
4241
RELEASE_URL="https://github.com/${VRAM_REPO}/releases/latest/download"
43-
VRAMHUB_RELEASE_URL="https://github.com/${VRAMHUB_REPO}/releases/latest/download"
4442
RAW_URL="https://raw.githubusercontent.com/${VRAM_REPO}/main"
4543

4644
# ─── Output helpers ──────────────────────────────────────────────────────────
@@ -342,18 +340,20 @@ else
342340
warn "Pre-built EIF not available in release — building from binary"
343341
rm -f "$EIF_PATH" 2>/dev/null || true
344342

345-
# Download the nautilus binary (static musl — from VRAM-HUB releases)
346-
curl -fsSL --retry 3 -o "$BUILD_DIR/vramhub-nautilus" \
347-
"${VRAMHUB_RELEASE_URL}/vramhub-nautilus-linux-x86_64" || \
348-
fatal "Could not download vramhub-nautilus binary from ${VRAMHUB_RELEASE_URL}"
349-
chmod +x "$BUILD_DIR/vramhub-nautilus"
350-
ok "Downloaded vramhub-nautilus binary"
343+
# Download the nautilus binary
344+
curl -fsSL --retry 3 -o "$BUILD_DIR/slcl-nautilus" \
345+
"${RELEASE_URL}/slcl-nautilus-linux-x86_64" || \
346+
fatal "Could not download slcl-nautilus binary from ${RELEASE_URL}"
347+
chmod +x "$BUILD_DIR/slcl-nautilus"
348+
ok "Downloaded slcl-nautilus binary"
351349

352-
# Dockerfile: FROM scratch — binary is static musl, no libc needed
350+
# Dockerfile: FROM alpine keeps EIF small; ttyS0 ensures console output
353351
cat > "$BUILD_DIR/Dockerfile" <<'DEOF'
354-
FROM scratch
355-
COPY vramhub-nautilus /vramhub-nautilus
356-
CMD ["/vramhub-nautilus"]
352+
FROM alpine:3.19
353+
RUN apk add --no-cache ca-certificates
354+
COPY slcl-nautilus /app/slcl-nautilus
355+
ENV PORT=3000
356+
ENTRYPOINT ["/bin/sh", "-c", "exec /app/slcl-nautilus 2>/dev/ttyS0"]
357357
DEOF
358358

359359
# Check nitro-cli blobs
@@ -375,11 +375,11 @@ DEOF
375375
[[ -f /etc/nitro_enclaves/nitro_enclaves.conf ]] || \
376376
echo "blobs_path=${BLOBS_DIR}" > /etc/nitro_enclaves/nitro_enclaves.conf
377377

378-
docker build -t vramhub-nautilus:latest "$BUILD_DIR/" 2>&1 | grep -v '^#' | tail -5
378+
docker build -t slcl-nautilus:latest "$BUILD_DIR/" 2>&1 | grep -v '^#' | tail -5
379379
ok "Docker image built"
380380

381381
nitro-cli build-enclave \
382-
--docker-uri vramhub-nautilus:latest \
382+
--docker-uri slcl-nautilus:latest \
383383
--output-file "$EIF_PATH" > "$BUILD_OUT" 2>&1 || {
384384
cat "$BUILD_OUT" >&2
385385
fatal "EIF build failed — see above"
@@ -580,14 +580,14 @@ if [[ ! -f "$ENV_FILE" ]]; then
580580
ok "Downloaded .env.example → ${ENV_FILE}"
581581
fi
582582

583-
# Flip to production mode (binary reads SLCL_ prefix)
584-
sed -i 's/^SLCL_TEST_MODE=true/SLCL_TEST_MODE=false/' "$ENV_FILE"
585-
sed -i 's/^SLCL_NITRO_ENCLAVE=false/SLCL_NITRO_ENCLAVE=true/' "$ENV_FILE"
586-
grep -q 'SLCL_ENCLAVE_URL' "$ENV_FILE" || \
587-
echo 'SLCL_ENCLAVE_URL=http://localhost:3000' >> "$ENV_FILE"
588-
grep -q 'SLCL_NAUTILUS_URL' "$ENV_FILE" && \
589-
sed -i 's|^SLCL_NAUTILUS_URL=.*|SLCL_NAUTILUS_URL=http://localhost:3000|' "$ENV_FILE" || \
590-
echo 'SLCL_NAUTILUS_URL=http://localhost:3000' >> "$ENV_FILE"
583+
# Flip to production mode
584+
sed -i 's/^VRAMHUB_TEST_MODE=true/VRAMHUB_TEST_MODE=false/' "$ENV_FILE"
585+
sed -i 's/^VRAMHUB_NITRO_ENCLAVE=false/VRAMHUB_NITRO_ENCLAVE=true/' "$ENV_FILE"
586+
grep -q 'VRAMHUB_ENCLAVE_URL' "$ENV_FILE" || \
587+
echo 'VRAMHUB_ENCLAVE_URL=http://localhost:3000' >> "$ENV_FILE"
588+
grep -q 'VRAMHUB_NAUTILUS_URL' "$ENV_FILE" && \
589+
sed -i 's|^VRAMHUB_NAUTILUS_URL=.*|VRAMHUB_NAUTILUS_URL=http://localhost:3000|' "$ENV_FILE" || \
590+
echo 'VRAMHUB_NAUTILUS_URL=http://localhost:3000' >> "$ENV_FILE"
591591

592592
# Check for wallet mnemonic
593593
_MNEMONIC=$(grep -E '^VRAMHUB_WALLET_MNEMONIC=' "$ENV_FILE" | \

0 commit comments

Comments
 (0)