-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e01c91c
commit 4fd711a
Showing
2 changed files
with
72 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" ] |