Skip to content

Commit

Permalink
chore: build image base sf 1.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
NewByVector committed Jun 20, 2024
1 parent e261377 commit 42d0302
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 31 deletions.
25 changes: 0 additions & 25 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ jobs:
tag:
type: string
default: latest
version:
type: string
default: 1.3.0b0

steps:
- checkout
Expand All @@ -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 \
Expand All @@ -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:
Expand All @@ -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
15 changes: 9 additions & 6 deletions docker/app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
ARG version=1.5.0b0

FROM alpine:3.14 as source-tree

RUN apk add --no-cache git
Expand All @@ -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

Expand All @@ -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/
Expand Down
1 change: 1 addition & 0 deletions pyprojects/secretnote/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down

0 comments on commit 42d0302

Please sign in to comment.