Skip to content

Commit

Permalink
chore: optimize docker build and version lock
Browse files Browse the repository at this point in the history
  • Loading branch information
z0gSh1u committed Sep 10, 2024
1 parent 90cdf40 commit c0ffbfa
Show file tree
Hide file tree
Showing 9 changed files with 3,519 additions and 3,284 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ jobs:
# Orchestrate jobs using workflows
# See: https://circleci.com/docs/configuration-reference/#workflows
workflows:
devcontainer-publish-1.6.1:
devcontainer-publish-1.9.0b0:
jobs:
- devcontainer-publish:
filters:
branches:
only:
- dev
- main
platform: linux/amd64
tag: 1.6.1.dev
tag: 1.9.0b0
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
registry=https://registry.npmmirror.com
disturl=https://npmmirror.com/mirrors/node

# PNPM
strict-peer-dependencies=false
Expand Down
10 changes: 6 additions & 4 deletions docker/app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ RUN git init \
&& rm -rf .git \
&& rm -r /repo/docker

# Build the project with pnpm and rye
FROM nikolaik/python-nodejs:python3.10-nodejs18-slim AS build
# Build the project
FROM nikolaik/python-nodejs:python3.10-nodejs18 AS build
ENV CI=true
USER root
WORKDIR /repo
RUN corepack enable && corepack prepare [email protected] --activate
RUN npm config set registry https://registry.npmmirror.com
RUN npm install -g [email protected]
RUN pip install build --break-system-packages
COPY --from=source-tree /repo/pnpm-lock.yaml /repo/.npmrc /repo/
RUN pnpm fetch
Expand All @@ -27,7 +28,8 @@ RUN rsync -avm --include='pyprojects/**/dist/*.whl' -f 'hide,! */' /repo/./ /dis

# Config the runtime
# TODO Update the version here
FROM secretflow/secretflow-anolis8:1.6.1b0
FROM secretflow/secretflow-anolis8:1.9.0b0
RUN python --version
RUN useradd -m secretnote
COPY --from=build /dist /dist
RUN pip install /dist/pyprojects/secretnote/dist/*.whl
Expand Down
17 changes: 14 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"ci:setup": ":",
"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 -t secretflow/secretnote:1.6.1-amd64 -f ./docker/app/Dockerfile .",
"ci:build": "nx run-many -t build:js && nx run-many -t build:py:ci",
"docker:build": "docker build -t secretflow/secretnote:1.9.0b0 -f ./docker/app/Dockerfile .",
"docker:up": "docker-compose -f ./docker/sim/docker-compose.yml up"
},
"nx": {},
Expand Down Expand Up @@ -66,5 +66,16 @@
"engines": {
"node": ">=18.18.0"
},
"packageManager": "[email protected]"
"packageManager": "[email protected]",
"pnpm": {
"overrides": {
"@difizen/mana-app": "0.1.23",
"@difizen/mana-core": "0.1.23",
"@difizen/mana-common": "0.1.23",
"@difizen/mana-l10n": "0.1.23",
"@difizen/mana-observable": "0.1.23",
"@difizen/mana-react": "0.1.23",
"@difizen/mana-syringe": "0.1.23"
}
}
}
36 changes: 29 additions & 7 deletions packages/secretnote-lite/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@alipay/secretnote-lite",
"version": "0.0.42",
"version": "0.0.43",
"license": "Apache-2.0",
"author": "[email protected]",
"repository": "https://github.com/secretflow/secretnote/tree/main/packages/secretnote",
Expand All @@ -22,12 +22,33 @@
},
"dependencies": {
"@antv/s2": "^1.52.0",
"@difizen/libro-jupyter": "^0.2.20",
"@difizen/libro-language-client": "^0.2.20",
"@difizen/mana-app": "^0.1.19",
"@difizen/mana-common": "^0.1.19",
"@difizen/mana-l10n": "^0.1.19",
"@difizen/mana-react": "^0.1.19",
"@difizen/mana-app": "0.1.23",
"@difizen/mana-common": "0.1.23",
"@difizen/mana-l10n": "0.1.23",
"@difizen/mana-react": "0.1.23",
"@difizen/libro-jupyter": "0.2.24",
"@difizen/libro-language-client": "0.2.24",
"@difizen/libro-code-cell": "0.2.24",
"@difizen/libro-code-editor": "0.2.24",
"@difizen/libro-codemirror": "0.2.24",
"@difizen/libro-cofine-editor": "0.2.24",
"@difizen/libro-cofine-editor-core": "0.2.24",
"@difizen/libro-cofine-editor-contribution": "0.2.24",
"@difizen/libro-cofine-textmate": "0.2.24",
"@difizen/libro-common": "0.2.24",
"@difizen/libro-core": "0.2.24",
"@difizen/libro-kernel": "0.2.24",
"@difizen/libro-l10n": "0.2.24",
"@difizen/libro-lsp": "0.2.24",
"@difizen/libro-markdown": "0.2.24",
"@difizen/libro-markdown-cell": "0.2.24",
"@difizen/libro-output": "0.2.24",
"@difizen/libro-raw-cell": "0.2.24",
"@difizen/libro-rendermime": "0.2.24",
"@difizen/libro-search": "0.2.24",
"@difizen/libro-search-code-cell": "0.2.24",
"@difizen/libro-shared-model": "0.2.24",
"@difizen/libro-virtualized": "0.2.24",
"@kanaries/web-data-loader": "^0.1.7",
"@lumino/polling": "^2.1.3",
"@tiptap/core": "^2.1.11",
Expand All @@ -54,6 +75,7 @@
"markdown-it": "^14.1.0",
"monaco-editor": "^0.45.0",
"monaco-editor-webpack-plugin": "^7.1.0",
"plotly.js": "2.34.0",
"styled-components": "^6.1.0",
"tippy.js": "^6.3.7",
"tiptap-markdown": "^0.8.2",
Expand Down
Loading

0 comments on commit c0ffbfa

Please sign in to comment.