Skip to content
Draft
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
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
node_modules
builds
.next
.idea
18 changes: 17 additions & 1 deletion Dockerfile.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# docker build -t ff .
# docker run -p 3000:3000 -it ff
# Build stage
Ω# Build stage
FROM --platform=$BUILDPLATFORM node:24.15.0-trixie-slim AS builder

ARG TARGETPLATFORM
Expand All @@ -17,6 +17,18 @@ RUN npm config set fetch-retries 5 && \
npm ci && \
npm cache clean --force

# Install Python and micromamba for JupyterLite build (cached independently of source changes)
RUN apt-get update && \
apt-get install -y --no-install-recommends python3 python3-venv curl bzip2 && \
rm -rf /var/lib/apt/lists/*

RUN ARCH=$(uname -m) && \
if [ "$ARCH" = "x86_64" ]; then MICROMAMBA_ARCH="linux-64"; \
elif [ "$ARCH" = "aarch64" ]; then MICROMAMBA_ARCH="linux-aarch64"; \
else echo "Unsupported architecture: $ARCH" && exit 1; fi && \
curl -Ls https://micro.mamba.pm/api/micromamba/${MICROMAMBA_ARCH}/latest | tar -xvj -C /usr/local/bin --strip-components=1 bin/micromamba && \
chmod +x /usr/local/bin/micromamba

# Copy necessary config files
COPY next.config.js tsconfig.json tailwind.config.js postcss.config.js ./
COPY .env.production ./
Expand All @@ -27,6 +39,9 @@ COPY ./public ./public
COPY ./config ./config
COPY ./start_with_config.sh ./start.sh

# Build JupyterLite static assets (outputs to public/ before Next.js build)
RUN npm run build:jupyterlite

# Build and prune
RUN npm run build:volume && \
npm prune --omit=dev;
Expand All @@ -43,6 +58,7 @@ COPY --from=builder --chown=nextjs:nextjs /gen3/.next/static ./.next/standalone/
COPY --from=builder --chown=nextjs:nextjs /gen3/start.sh ./start.sh
COPY --from=builder --chown=nextjs:nextjs /gen3/config ./config
COPY --from=builder --chown=nextjs:nextjs /gen3/public ./public
COPY --from=builder --chown=nextjs:nextjs /gen3/jupyter-workspaces ./jupyter-workspaces

#VOLUME /gen3/config
#VOLUME /gen3/public
Expand Down
44 changes: 32 additions & 12 deletions Dockerfile.production
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ FROM --platform=$BUILDPLATFORM node:24.15.0-trixie-slim AS builder

ARG TARGETPLATFORM
ARG BUILDPLATFORM

ARG TARGETARCH
WORKDIR /gen3

# Copy dependency files first for better caching
Expand All @@ -18,6 +18,18 @@ RUN npm config set fetch-retries 5 && \
npm ci && \
npm cache clean --force

# Install Python and micromamba for JupyterLite build (cached independently of source changes)
RUN apt-get update && \
apt-get install -y --no-install-recommends python3 python3-venv curl bzip2 && \
rm -rf /var/lib/apt/lists/*

RUN ARCH=$(uname -m) && \
if [ "$ARCH" = "x86_64" ]; then MICROMAMBA_ARCH="linux-64"; \
elif [ "$ARCH" = "aarch64" ]; then MICROMAMBA_ARCH="linux-aarch64"; \
else echo "Unsupported architecture: $ARCH" && exit 1; fi && \
curl -Ls https://micro.mamba.pm/api/micromamba/${MICROMAMBA_ARCH}/latest | tar -xvj -C /usr/local/bin --strip-components=1 bin/micromamba && \
chmod +x /usr/local/bin/micromamba

# Copy necessary config files
COPY next.config.js tsconfig.json tailwind.config.js postcss.config.js ./
COPY .env.production ./
Expand All @@ -28,9 +40,11 @@ COPY ./public ./public
COPY ./config ./config
COPY ./start.sh ./

# Build and prune
RUN npm run build && \
npm prune --omit=dev;
# Build JupyterLite static assets (outputs to public/ before Next.js build)
RUN npm run build:jupyterlite

# Build
RUN npm run build

# Production stage
FROM node:24.15.0-trixie-slim AS runner
Expand All @@ -40,22 +54,28 @@ WORKDIR /gen3
RUN addgroup --system --gid 1001 nextjs && \
adduser --system --uid 1001 nextjs

# Copy only production dependencies
COPY --from=builder --chown=nextjs:nextjs /gen3/package.json ./
COPY --from=builder --chown=nextjs:nextjs /gen3/node_modules ./node_modules
COPY --from=builder --chown=nextjs:nextjs /gen3/config ./config
COPY --from=builder --chown=nextjs:nextjs /gen3/.next ./.next
COPY --from=builder --chown=nextjs:nextjs /gen3/public ./public
COPY --from=builder --chown=nextjs:nextjs /gen3/.next/standalone ./.next/standalone
COPY --from=builder --chown=nextjs:nextjs /gen3/.next/static ./.next/standalone/.next/static
COPY --from=builder --chown=nextjs:nextjs /gen3/start.sh ./start.sh
COPY --from=builder --chown=nextjs:nextjs /gen3/public ./public
COPY --from=builder --chown=nextjs:nextjs /gen3/config ./config
COPY --from=builder --chown=nextjs:nextjs /gen3/jupyter-workspaces ./jupyter-workspaces

RUN mkdir -p .next/cache/images && \
RUN mkdir -p .next/standalone/.next/cache/images && \
chmod -R 777 .next/standalone/.next/cache && \
chown -R nextjs:nextjs .next/standalone/.next/cache && \
chmod +x start.sh && \
chown -R nextjs:nextjs .next/cache
chown -R nextjs:nextjs start.sh && \
rm -rf .next/standalone/config && \
cd .next/standalone && \
ln -s ../../config ./config && \
ln -s ../../public ./public

USER nextjs:nextjs

ENV NODE_ENV=production \
PORT=3000 \
HOSTNAME=0.0.0.0 \
NEXT_TELEMETRY_DISABLED=1

CMD ["sh", "./start.sh"]
16 changes: 16 additions & 0 deletions Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@ RUN npm config set fetch-retries 5 && \
npm ci && \
npm cache clean --force

# Install Python for JupyterLite build (cached independently of source changes)
RUN apt-get update && \
apt-get install -y --no-install-recommends python3 python3-venv curl bzip2 && \
rm -rf /var/lib/apt/lists/*

RUN ARCH=$(uname -m) && \
if [ "$ARCH" = "x86_64" ]; then MICROMAMBA_ARCH="linux-64"; \
elif [ "$ARCH" = "aarch64" ]; then MICROMAMBA_ARCH="linux-aarch64"; \
else echo "Unsupported architecture: $ARCH" && exit 1; fi && \
curl -Ls https://micro.mamba.pm/api/micromamba/${MICROMAMBA_ARCH}/latest | tar -xvj -C /usr/local/bin --strip-components=1 bin/micromamba && \
chmod +x /usr/local/bin/micromamba

# Copy necessary config files
COPY next.config.js tsconfig.json tailwind.config.js postcss.config.js ./
COPY .env.test ./
Expand All @@ -30,6 +42,9 @@ COPY ./start.sh ./

ENV NODE_ENV=test

# Build JupyterLite static assets (outputs to public/ before Next.js build)
RUN npm run build:jupyterlite

# Build and prune
RUN npm run build && \
npm prune --omit=dev;
Expand All @@ -49,6 +64,7 @@ COPY --from=builder --chown=nextjs:nextjs /ci/config ./config
COPY --from=builder --chown=nextjs:nextjs /ci/.next ./.next
COPY --from=builder --chown=nextjs:nextjs /ci/public ./public
COPY --from=builder --chown=nextjs:nextjs /ci/start.sh ./start.sh
COPY --from=builder --chown=nextjs:nextjs /ci/jupyter-workspaces ./jupyter-workspaces

RUN mkdir -p .next/cache/images && \
chmod +x start.sh && \
Expand Down
30 changes: 30 additions & 0 deletions config/ci/workspaces.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"workspaces": {
"free": {
"label": "Jupyter Lite",
"tier": "free",
"description": "Instant startup and lightweight notebooks directly in your browser.",
"features": ["Instant startup", "Lightweight notebooks", "Browser-based"],
"buttonLabel": "Launch Local Workspace",
"runningLabel": {
"label": "Local Browser Environment",
"description": "Running via JupyterLite"
}
},
"remote": {
"label": "Remote Kernel Runtime",
"tier": "remote",
"description": " Attach to remote compute for longer sessions and larger workloads.",
"features": [
"Persistent sessions and gateway routing",
"Designed for heavier workloads"
],
"buttonLabel": "Launch Remote Workspace",
"baseColor": "#42f5d422",
"runningLabel": {
"label": "Remote Browser Environment",
"description": "Running via Remote Kernels (Paid Tier)"
}
}
}
}
30 changes: 30 additions & 0 deletions config/gen3/workspaces.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"workspaces": {
"free": {
"label": "Jupyter Lite",
"tier": "free",
"description": "Instant startup and lightweight notebooks directly in your browser.",
"features": ["Instant startup", "Lightweight notebooks", "Browser-based"],
"buttonLabel": "Launch Local Workspace",
"runningLabel": {
"label": "Local Browser Environment",
"description": "Running via JupyterLite"
}
},
"remote": {
"label": "Remote Kernel Runtime",
"tier": "remote",
"description": " Attach to remote compute for longer sessions and larger workloads.",
"features": [
"Persistent sessions and gateway routing",
"Designed for heavier workloads"
],
"buttonLabel": "Launch Remote Workspace",
"baseColor": "#42f5d422",
"runningLabel": {
"label": "Remote Browser Environment",
"description": "Running via Remote Kernels (Paid Tier)"
}
}
}
}
2 changes: 1 addition & 1 deletion config/icons/color.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"prefix": "color",
"lastModified": 1770235306,
"lastModified": 1783020138,
"icons": {
"analysis": {
"body": "<g fill=\"currentColor\"><path d=\"m52 22 3.293 3.293L44 36.586l-12-12-12.707 12.707 1.414 1.414L32 27.414l12 12 12.707-12.707L60 30v-8z\"/><path d=\"M20 42a4 4 0 110-8 4 4 0 010 8m0 6a2 2 0 11-.001-3.999A2 2 0 0120 48m12-8a2 2 0 11-.001-3.999A2 2 0 0132 40m12-10a2 2 0 11-.001-3.999A2 2 0 0144 30M20 16a2 2 0 11-.001-3.999A2 2 0 0120 16m0 14a2 2 0 11-.001-3.999A2 2 0 0120 30m16-14a2 2 0 11-.001-3.999A2 2 0 0136 16m-10 6a2 2 0 11-.001-3.999A2 2 0 0126 22m12 26a2 2 0 11-.001-3.999A2 2 0 0138 48m12-2a2 2 0 11-.001-3.999A2 2 0 0150 46M32 30a4 4 0 110-8 4 4 0 010 8m12 12a4 4 0 110-8 4 4 0 010 8\"/><path d=\"M18 38a3.99 3.99 0 013-3.859A4 4 0 0020 34a4 4 0 000 8c.347 0 .679-.058 1-.141-1.722-.447-3-1.997-3-3.859m12-12a3.99 3.99 0 013-3.859A4 4 0 0032 22a4 4 0 000 8c.347 0 .679-.058 1-.141-1.722-.447-3-1.997-3-3.859m12 12a3.99 3.99 0 013-3.859A4 4 0 0044 34a4 4 0 000 8c.347 0 .679-.058 1-.141-1.722-.447-3-1.997-3-3.859\"/><path d=\"m60 54-6-6v4H12V14h4l-6-6-6 6h4v42h46v4z\"/><path d=\"M10 14H8v42h2v-4zm0-6-6 6h2l5-5zm42 12a8 8 0 110-16 8 8 0 010 16\"/><path d=\"M46 12c0-4.079 3.055-7.438 7-7.931A8 8 0 0052 4a8 8 0 000 16c.339 0 .672-.028 1-.069-3.945-.493-7-3.852-7-7.931\"/><path d=\"m52 14.707-2-2-1.646 1.647-.708-.708L50 11.293l2 2 1.646-1.647.708.708z\"/><path d=\"m52 10 4 4v-4z\"/></g>",
Expand Down
2 changes: 1 addition & 1 deletion config/icons/dataDictionary.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"prefix": "dataDictionary",
"lastModified": 1770235306,
"lastModified": 1783020138,
"icons": {
"administrative": {
"body": "<g fill=\"currentColor\" fill-rule=\"evenodd\"><path d=\"M5.5 4.9h.72c.013.005.026.015.038.016.261.015.522.023.782.044.466.037.93.101 1.385.253.377.126.73.322 1.018.707.038.05.057.1.057.177q-.002 3.847-.001 7.696v.107c-.018-.007-.025-.008-.031-.012q-.118-.082-.234-.17a3.8 3.8 0 00-1.973-.803c-.51-.053-1.023-.07-1.534-.101-.07-.005-.142-.001-.22-.001V5.036c0-.046-.005-.09-.007-.136m8.28 0h.72q-.005.067-.007.135v7.63l-.004.136h-.077a13 13 0 00-1.784.118 4 4 0 00-1.863.79c-.084.064-.17.123-.265.191v-.107q0-3.854.002-7.707c0-.051.02-.115.045-.15q.222-.309.509-.484c.33-.205.68-.304 1.035-.375.506-.1 1.015-.14 1.526-.158.054-.002.108-.013.162-.019\"/><path d=\"M3.5 5.9h.983v8.114h.12c.61.012 1.22.01 1.828.039.717.033 1.434.105 2.121.374.316.123.618.295.925.446.01.004.016.018.023.027h-6zm8 9c.006-.01.011-.022.019-.028.5-.36 1.027-.598 1.584-.702a10 10 0 011.686-.148l.799-.008h.093V5.9h.819v9z\"/></g>"
Expand Down
Loading
Loading