Skip to content

Commit

Permalink
chore: optimize 1.6.1 image
Browse files Browse the repository at this point in the history
  • Loading branch information
NewByVector committed Jun 26, 2024
1 parent 5200d63 commit be777c4
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
9 changes: 3 additions & 6 deletions docker/app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,16 @@ RUN apt-get update && apt-get install -y rsync
RUN rsync -avm --include='pyprojects/**/dist/*.whl' -f 'hide,! */' /repo/./ /dist


FROM python:3.10-slim-bullseye
FROM secretflow/secretflow-anolis8:1.6.1b0

COPY --from=build /dist /dist

RUN apt update
RUN apt install -y build-essential

RUN pip install /dist/pyprojects/secretnote/dist/*.whl

WORKDIR /root

RUN apt install -y nodejs
RUN apt install -y npm
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/ /root/
Expand Down
6 changes: 5 additions & 1 deletion docker/app/root/scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@ ray start \
--disable-usage-stats \
--resources="{\"$SELF_PARTY\": 4}"

secretnote --allow-root --no-browser
if [ -z "${PORT}" ]; then
PORT=8888
fi

secretnote --allow-root --no-browser --port $PORT
20 changes: 10 additions & 10 deletions docker/sim/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
services:
alice:
image: 'secretflow/secretnote:1.3.0-amd64'
image: 'secretflow/secretnote:1.6.1-amd64'
platform: linux/amd64
environment:
- SELF_PARTY=alice
- ALL_PARTIES=alice,bob
- PORT=8090
ports:
# SecretNote
- 8090:8888
entrypoint: /root/scripts/start.sh
- 8090:8090
volumes:
- ./alice:/root/workspace

bob:
image: 'secretflow/secretnote:1.3.0-amd64'
image: 'secretflow/secretnote:1.6.1-amd64'
platform: linux/amd64
environment:
- SELF_PARTY=bob
- ALL_PARTIES=alice,bob
- PORT=8092
ports:
# SecretNote
- 8092:8888
entrypoint: /root/scripts/start.sh
- 8092:8092
volumes:
- ./bob:/root/workspace
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"ci:check:javascript": "nx run-many -t format:prettier -t lint:eslint -t lint:stylelint -t test:vitest -t typecheck:tsc",
"ci:check:python": "nx run-many -t format:black -t lint:ruff -t test:pytest -t typecheck:pyright",
"ci:build": "nx run-many -t build:js -t build:py",
"docker:build": "docker build --build-arg version=1.3.0b0 -t secretflow/secretnote:1.3.0-amd64 -f ./docker/app/Dockerfile .",
"docker:build": "docker build -t secretflow/secretnote:1.6.1-amd64 -f ./docker/app/Dockerfile .",
"docker:up": "docker-compose -f ./docker/sim/docker-compose.yml up"
},
"nx": {},
Expand Down
1 change: 0 additions & 1 deletion pyprojects/secretnote/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ 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 be777c4

Please sign in to comment.