From 42d0302c6944cbe343aea0d7c3c6db0bb9267671 Mon Sep 17 00:00:00 2001 From: newbyvector Date: Thu, 20 Jun 2024 22:55:12 +0800 Subject: [PATCH] chore: build image base sf 1.6.1 --- .circleci/config.yml | 25 ------------------------- docker/app/Dockerfile | 15 +++++++++------ pyprojects/secretnote/pyproject.toml | 1 + 3 files changed, 10 insertions(+), 31 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0a74778..674e302 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -17,9 +17,6 @@ jobs: tag: type: string default: latest - version: - type: string - default: 1.3.0b0 steps: - checkout @@ -32,7 +29,6 @@ jobs: docker buildx build \ --platform=<< parameters.platform >> \ - --build-arg version=<< parameters.version >> \ -f docker/app/Dockerfile \ -t ${IMAGE_NAME} \ --progress=plain \ @@ -44,16 +40,6 @@ jobs: # Orchestrate jobs using workflows # See: https://circleci.com/docs/configuration-reference/#workflows workflows: - devcontainer-publish-1.3.0-amd64: - jobs: - - devcontainer-publish: - filters: - branches: - only: - - main - platform: linux/amd64 - version: 1.3.0b0 - tag: 1.3.0-amd64 devcontainer-publish-1.6.1-amd64: jobs: - devcontainer-publish: @@ -62,15 +48,4 @@ workflows: only: - main platform: linux/amd64 - version: 1.6.1b0 tag: 1.6.1-amd64 - devcontainer-publish-1.6.0-arm64: - jobs: - - devcontainer-publish: - filters: - branches: - only: - - main - platform: linux/arm64 - version: 1.6.1b0 - tag: 1.6.1-arm64 diff --git a/docker/app/Dockerfile b/docker/app/Dockerfile index cb29dd6..5d400a2 100644 --- a/docker/app/Dockerfile +++ b/docker/app/Dockerfile @@ -1,5 +1,3 @@ -ARG version=1.5.0b0 - FROM alpine:3.14 as source-tree RUN apk add --no-cache git @@ -10,7 +8,7 @@ RUN git init \ && rm -r /repo/docker -FROM secretflow/devcontainer-web:latest as build +FROM secretflow/devcontainer-web:amd64-v2 as build ENV CI=true @@ -25,22 +23,27 @@ COPY --from=source-tree /repo /repo RUN pnpm install --frozen-lockfile --offline +RUN cargo install gcc RUN pnpm exec nx run-many -t build:js -t build:py RUN apt-get update && apt-get install -y rsync RUN rsync -avm --include='pyprojects/**/dist/*.whl' -f 'hide,! */' /repo/./ /dist -FROM secretflow/secretflow-anolis8:${version} +FROM python:3.10-slim-bullseye COPY --from=build /dist /dist +RUN apt update +RUN apt install -y build-essential + +RUN pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/ RUN pip install /dist/pyprojects/secretnote/dist/*.whl WORKDIR /root -RUN curl -fsSL https://rpm.nodesource.com/setup_18.x | bash - -RUN yum install -y nodejs +RUN apt install -y nodejs +RUN apt install -y npm RUN npm install @difizen/libro-analyzer COPY ./docker/app/root/ /root/ diff --git a/pyprojects/secretnote/pyproject.toml b/pyprojects/secretnote/pyproject.toml index 77eb14a..02b04ef 100644 --- a/pyprojects/secretnote/pyproject.toml +++ b/pyprojects/secretnote/pyproject.toml @@ -32,6 +32,7 @@ dependencies = [ "python-lsp-server==1.8.2", # https://github.com/python/typing_extensions/issues/369#issuecomment-2051331676 "typing_extensions>=4.6", + "secretflow==1.6.1b0" ] description = "Notebook suite for SecretFlow" dynamic = ["version"]