Skip to content

Commit

Permalink
feat: su other user to exec secretnote in docker
Browse files Browse the repository at this point in the history
  • Loading branch information
NewByVector committed Jul 31, 2024
1 parent 2dfdebf commit 46d5b35
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
# Orchestrate jobs using workflows
# See: https://circleci.com/docs/configuration-reference/#workflows
workflows:
devcontainer-publish-1.6.1-amd64:
devcontainer-publish-1.6.1:
jobs:
- devcontainer-publish:
filters:
Expand Down
19 changes: 10 additions & 9 deletions docker/app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,27 @@ FROM secretflow/secretflow-anolis8:1.6.1b0

RUN useradd -m secretnote

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 config set registry https://registry.npmmirror.com
RUN npm install @difizen/libro-analyzer

COPY ./docker/app/root/ /root/
COPY --from=build /dist /dist
RUN pip install /dist/pyprojects/secretnote/dist/*.whl

WORKDIR /home/secretnote

COPY ./docker/app/root/ ./

RUN mkdir workspace

RUN chown -R secretnote:secretnote /root
RUN chown -R secretnote:secretnote /home/secretnote
USER secretnote


ENV SELF_PARTY=alice
ENV ALL_PARTIES=alice,bob

EXPOSE 8888

ENTRYPOINT [ "/root/scripts/start.sh" ]
ENTRYPOINT [ "/home/secretnote/scripts/start.sh" ]
2 changes: 1 addition & 1 deletion docker/app/root/.jupyter/jupyter_server_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

c.ServerApp.ip = "*"

c.ServerApp.root_dir = "/root/workspace"
c.ServerApp.root_dir = "/home/secretnote/workspace"

c.LanguageServerManager.autodetect = False

Expand Down
4 changes: 2 additions & 2 deletions docker/sim/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
alice:
image: 'secretflow/secretnote:1.6.1-amd64'
image: 'secretflow/secretnote:1.6.1'
platform: linux/amd64
environment:
- SELF_PARTY=alice
Expand All @@ -10,7 +10,7 @@ services:
- ./alice:/root/workspace

bob:
image: 'secretflow/secretnote:1.6.1-amd64'
image: 'secretflow/secretnote:1.6.1'
platform: linux/amd64
environment:
- SELF_PARTY=bob
Expand Down

0 comments on commit 46d5b35

Please sign in to comment.