Skip to content

Commit

Permalink
chore: add 1.5 image (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
NewByVector authored Mar 28, 2024
1 parent e01c91c commit 6a96521
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 5 deletions.
22 changes: 17 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ jobs:
tag:
type: string
default: latest
file:
type: string
default: docker/app/Dockerfile

steps:
- checkout
Expand All @@ -29,7 +32,7 @@ jobs:
docker buildx build \
--platform=<< parameters.platform >> \
-f docker/app/Dockerfile \
-f << parameters.file >> \
-t ${IMAGE_NAME} \
--progress=plain \
.
Expand All @@ -49,13 +52,22 @@ workflows:
- main
platform: linux/amd64
tag: unstable-amd64

devcontainer-publish-arm64:
devcontainer-publish-dev-1.5:
jobs:
- devcontainer-publish:
filters:
branches:
only:
- main
platform: linux/arm64
tag: unstable-arm64
platform: linux/amd64
tag: 1.5.0.dev
file: docker/app/Dockerfile.dev
# devcontainer-publish-arm64:
# jobs:
# - devcontainer-publish:
# filters:
# branches:
# only:
# - main
# platform: linux/arm64
# tag: unstable-arm64
55 changes: 55 additions & 0 deletions docker/app/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# doesn't support linux/arm64

FROM alpine:3.14 as source-tree

RUN apk add --no-cache git
COPY . /repo
RUN git init \
&& git clean -fX . \
&& rm -rf .git \
&& rm -r /repo/docker

FROM secretflow/devcontainer-web:latest as build

ENV CI=true

USER root
WORKDIR /repo

COPY --from=source-tree /repo/pnpm-lock.yaml /repo/.npmrc /repo/

RUN pnpm fetch

COPY --from=source-tree /repo /repo

RUN pnpm install --frozen-lockfile --offline
# RUN rye sync --no-dev --no-lock --all-features

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:1.5.0.dev20240321

COPY --from=build /dist /dist

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 npm install @difizen/libro-analyzer

COPY ./docker/app/root/scripts /root/scripts
COPY ./docker/app/root/.jupyter /root/.jupyter

RUN mkdir workspace

ENV SELF_PARTY=alice
ENV ALL_PARTIES=alice

EXPOSE 8888

ENTRYPOINT [ "/root/scripts/start.sh" ]

0 comments on commit 6a96521

Please sign in to comment.