Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
# ghcr.io/eda-labs/eda-devcontainer
FROM public.ecr.aws/docker/library/debian:bookworm-slim

ARG EDA_VERSION=25.12.1
# change this one to change EDA version
ARG EDA_VERSION=25.12.2

ARG EDA_PLAYGROUND_REPO=nokia-eda/playground
ARG EDA_PLAYGROUND_DIR=/home/vscode/.playground

# set this one before the substitution
ENV CODESPACE_EDA_VERSION=$EDA_VERSION

ENV EDA_VERSION=${EDA_VERSION//./-}
ENV EDA_PLAYGROUND_REPO=$EDA_PLAYGROUND_REPO
ENV EDA_PLAYGROUND_DIR=$EDA_PLAYGROUND_DIR
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Nokia EDA in GitHub Codespaces",
"image": "ghcr.io/eda-labs/codespaces/base:25.12.1-1",
"image": "ghcr.io/eda-labs/codespaces/base:25.12.2-1",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"version": "latest",
Expand Down
6 changes: 6 additions & 0 deletions .devcontainer/overrides.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ KPT_RETRY ?= 5
KPT_RECONCILE_TIMEOUT ?= 3m
KPT_LIVE_APPLY_ARGS += --reconcile-timeout=$(KPT_RECONCILE_TIMEOUT)

ifdef CODESPACE_EDA_VERSION
EDA_CORE_VERSION=$(CODESPACE_EDA_VERSION)
EDA_APPS_VERSION=$(CODESPACE_EDA_VERSION)
EDABUILDER_VERSION=$(CODESPACE_EDA_VERSION)
endif

# Override the INSTALL_KPT_PACKAGE macro
#
# Set the --reconcile-timeout flag so that KPT doesn't just hang for a while
Expand Down
13 changes: 4 additions & 9 deletions .devcontainer/postCreate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,13 @@ source .devcontainer/utils.sh

cd $EDA_PLAYGROUND_DIR

# get token
encoded=$(grep 'GH_PKG_TOKEN ?=' "Makefile" | sed 's/.*?= *//')
prefix=$(printf '%s' 'Z2hwCg==' | base64 -d)
suffix=$(printf '%s' "$encoded" | base64 -d | cut -c 4- | tr -d '\n')
TOKEN="${prefix}${suffix}"

log "Starting image prepull"
T_START=$(date +%s)
# preload images into the cluster from the EDA core list
# to reduce the number of jobs: PARALLEL_JOBS=$(($(nproc) - 1))
PARALLEL_JOBS=$(nproc)
docker exec k3d-eda-demo-server-0 sh -c "cat /opt/images.txt | xargs -P $PARALLEL_JOBS -I {} crictl pull --creds nokia-eda-bot:$TOKEN {}"
# to reduce the number of jobs:
PARALLEL_JOBS=$(($(nproc) - 1))
# PARALLEL_JOBS=$(nproc)
docker exec k3d-eda-demo-server-0 sh -c "cat /opt/images.txt | xargs -P $PARALLEL_JOBS -I {} sh -c 'echo \"[\$(date +%H:%M:%S)] Pulling image {}\"; crictl pull {} >/dev/null 2>&1'"

T_END=$(date +%s)
log "Images pulled. Took $((T_END-T_START)) seconds."
Expand Down