Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/build-engine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ on:
- develop
- stage
- testnet
- mainnet

env:
IMAGE_FILE: ''
Expand All @@ -28,6 +29,7 @@ env:
DOCKERFILE_CONTEXT: ''
SUBMODULE_PATH: ''
TARGET: ${{ inputs.target }}
ALLOW_MULTIPLE_UPDATE: false

jobs:
build-engine:
Expand Down Expand Up @@ -58,6 +60,7 @@ jobs:
DOCKERFILE="./ComfyUI/Dockerfile.prod"
DOCKERFILE_CONTEXT="./ComfyUI/"
SUBMODULE_PATH="ComfyUI/ComfyUI"
ALLOW_MULTIPLE_UPDATE="true"
else
echo "Invalid solution name"
exit 1
Expand All @@ -67,6 +70,7 @@ jobs:
echo "DOCKERFILE_CONTEXT=$DOCKERFILE_CONTEXT" >> $GITHUB_ENV
echo "SUBMODULE_PATH=$SUBMODULE_PATH" >> $GITHUB_ENV
echo "BUILD_ARGS=$BUILD_ARGS" >> $GITHUB_ENV
echo "ALLOW_MULTIPLE_UPDATE=$ALLOW_MULTIPLE_UPDATE" >> $GITHUB_ENV

- name: Checkout git submodules
run: |
Expand All @@ -89,6 +93,8 @@ jobs:
echo "${{ secrets.STAGING_SOLUTION_ENV_BASE64 }}" | base64 --decode > .env
elif [ "$TARGET" == "testnet" ]; then
echo "${{ secrets.TESTNET_SOLUTION_ENV_BASE64 }}" | base64 --decode > .env
elif [ "$TARGET" == "mainnet" ]; then
echo "${{ secrets.MAINNET_SOLUTION_ENV_BASE64 }}" | base64 --decode > .env
else
echo "Invalid instance: $TARGET"
exit 1
Expand Down Expand Up @@ -131,6 +137,9 @@ jobs:

elif [ "$TARGET" == "testnet" ]; then
SPCTL_CONFIG="${{ secrets.TESTNET_SPCTL_CONFIG_BASE64 }}"

elif [ "$TARGET" == "mainnet" ]; then
SPCTL_CONFIG="${{ secrets.MAINNET_SPCTL_CONFIG_BASE64 }}"
fi

echo "$SPCTL_CONFIG" | base64 --decode > ./config.json
Expand All @@ -151,3 +160,4 @@ jobs:
resource_file: ${{ steps.upload_image.outputs.resource }}
solution_name: ${{ env.SOLUTION }}
commit_type: pull-request
allow_multiple_update: ${{ env.ALLOW_MULTIPLE_UPDATE }}
13 changes: 12 additions & 1 deletion ComfyUI/Dockerfile.prod
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ RUN --mount=type=cache,target=/root/.npm \
# Set environment variables
ARG COMFYUI_VERSION=0.3.10
ARG COMFYUI_MANAGER_VERSION=3.6.5
ARG COMFYUI_PATH=/opt/ComfyUI
ENV COMFYUI_PATH=/opt/ComfyUI

RUN git config --global user.email "container@super-protocol.com" \
&& git config --global user.name "Container Builder" \
Expand All @@ -83,7 +83,18 @@ RUN comfy --skip-prompt tracking disable
RUN comfy --skip-prompt --workspace $COMFYUI_PATH install --version $COMFYUI_VERSION --manager-commit $COMFYUI_MANAGER_VERSION --nvidia --cuda-version=12.4

RUN comfy --skip-prompt set-default ${COMFYUI_PATH}

# Creating ComfyUI Manager config file
RUN mkdir -p ${COMFYUI_PATH}/user/default/ComfyUI-Manager
RUN <<EOF cat >> ${COMFYUI_PATH}/user/default/ComfyUI-Manager/config.ini
[default]
security_level = strong
EOF
# FIXME: following command is failing for some reason -
RUN comfy manager disable-gui
# simulating the same command
# see https://github.com/jiangyangfan/ComfyUI-Manager/blob/5bf9914e17244560ef69ad4de218150fa755e88d/cm-cli.py#L748-L764
RUN echo "yes" > ${COMFYUI_PATH}/custom_nodes/ComfyUI-Manager/.enable-cli-only-mode

# Change into ComfyUI directory
WORKDIR ${COMFYUI_PATH}
Expand Down
123 changes: 72 additions & 51 deletions ComfyUI/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions ComfyUI/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
"@types/node": "^22.7.9"
},
"dependencies": {
"@super-protocol/dto-js": "1.0.0",
"@super-protocol/sdk-js": "3.0.5",
"@super-protocol/solution-utils": "1.4.0",
"@super-protocol/dto-js": "1.1.2",
"@super-protocol/sdk-js": "3.4.0-beta.11",
"@super-protocol/solution-utils": "1.4.2",
"@super-protocol/tunnels-lib": "^0.2.1",
"dotenv": "^16.4.5",
"pino": "^7.11.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,7 @@ const setupModels = async (serverConfig: IServerConfig, logger: Logger): Promise
const extraModelPathFilepath = path.join(serverConfig.engineFolder, EXTRA_MODEL_PATH_FILENAME);
await fs.promises.writeFile(extraModelPathFilepath, extraModelPathData);

logger.info({ extraModelPathFilepath }, `extraModelPathFilepath file save successfully`);

return ['--extra-model-paths-config', extraModelPathFilepath];
};
2 changes: 1 addition & 1 deletion ComfyUI/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const run = async (): Promise<void> => {
...cliParams,
];

logger.trace({ cliParams: spawnOptions }, `ComfyUI will be started with cli params`);
logger.info({ cliParams: spawnOptions }, `ComfyUI will be started with cli params`);

const pythonProcess = spawn('comfy', spawnOptions, {
stdio: ['ignore', 'inherit', 'inherit'],
Expand Down
28 changes: 28 additions & 0 deletions Example Signer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM ubuntu:22.04

# Install required packages
RUN apt-get update && apt-get install -y \
openssl \
curl \
jq \
tzdata \
sed \
grep \
coreutils \
&& rm -rf /var/lib/apt/lists/*

# Copy script
COPY sign_data.sh /usr/local/bin/

# Set execution permissions
RUN chmod +x /usr/local/bin/sign_data.sh

# Set environment variables
ENV CERTS_DIR=/sp/certs
ENV OUTPUT_DIR=/sp/output

# Set working directory
WORKDIR /sp

# Set entrypoint to sign_data.sh
ENTRYPOINT ["sign_data.sh", "crypto"]
Loading
Loading