From c83c33263fc481c5efa0fbcec84f8b4a71c9caab Mon Sep 17 00:00:00 2001 From: mikejgray Date: Thu, 21 Dec 2023 22:53:22 -0600 Subject: [PATCH] address feedback --- .../workflows/publish_test_websat_build.yml | 62 ------------------- Dockerfile | 6 +- README.md | 2 +- entrypoint.sh | 11 ++++ 4 files changed, 15 insertions(+), 66 deletions(-) delete mode 100644 .github/workflows/publish_test_websat_build.yml create mode 100755 entrypoint.sh diff --git a/.github/workflows/publish_test_websat_build.yml b/.github/workflows/publish_test_websat_build.yml deleted file mode 100644 index 22bce64..0000000 --- a/.github/workflows/publish_test_websat_build.yml +++ /dev/null @@ -1,62 +0,0 @@ -name: Publish Docker Containers -on: - push: - branches: - - dev - - main - -env: - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }}-websat - -jobs: - build_and_publish_docker: - runs-on: ubuntu-latest - outputs: - version: "${{ steps.version.version }}" - permissions: - contents: read - packages: write - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - ref: ${{ github.ref }} - - - name: Log in to the Container registry - uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Get Version - id: version - run: | - VERSION=$(sed "s/a/-a./" <<< $(python setup.py --version)) - echo "version=${VERSION}" >> $GITHUB_OUTPUT - env: - image_name: ${{ env.IMAGE_NAME }} - - - name: Setup QEMU - uses: docker/setup-qemu-action@v3 - - name: Setup Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Extract metadata for base Docker - id: base_meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - tags: | - type=semver,pattern={{version}},value=${{ steps.version.outputs.version }} - type=ref,event=branch - - name: Build and push Docker image - uses: docker/build-push-action@v5 - with: - context: . - file: ./Dockerfile.websat - push: true - tags: ${{ steps.base_meta.outputs.tags }} - labels: ${{ steps.base_meta.outputs.labels }} - platforms: linux/amd64,linux/arm64,linux/arm/v7 diff --git a/Dockerfile b/Dockerfile index 02dcacf..1aade3f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,7 +40,7 @@ COPY docker_overlay/ / # Expose port 8000 for websat EXPOSE 8000 -ENTRYPOINT ["iris"] +# Set the ARG value as an environment variable +ENV EXTRAS=${EXTRAS} -# Default command -CMD ["-h"] +ENTRYPOINT ["/neon_iris/entrypoint.sh"] diff --git a/README.md b/README.md index 2dbfab7..ba1acce 100644 --- a/README.md +++ b/README.md @@ -126,7 +126,7 @@ iris: webui_title: Neon AI webui_description: Chat with Neon webui_input_placeholder: Ask me something - webui_ws_url: wss://neonaialpha.com:8000/ws + webui_ws_url: wss://neonaialpha.com/ws ``` ### Customization diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100755 index 0000000..3ad8564 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,11 @@ +#!/bin/bash +set -e + +if [ "$EXTRAS" = "gradio" ]; then + exec iris start-gradio + elif [ "$EXTRAS" = "web_sat" ]; then + exec iris start-websat +else + echo "No extras specified, showing help. To execute a command, use 'docker run iris '" + exec iris -h +fi