├── .github └── workflows │ └── publish-docker.yml ├── Dockerfile ├── LICENSE ├── README.docker.md ├── README.md └── docker-compose.yaml /.github/workflows/publish-docker.yml: -------------------------------------------------------------------------------- 1 | name: Publish Docker images 2 | 3 | on: 4 | push: 5 | branches: [main] 6 | release: 7 | types: [published] 8 | workflow_dispatch: 9 | 10 | permissions: 11 | packages: write 12 | contents: read 13 | 14 | jobs: 15 | 16 | call-docker-build-gpt-code-ui: 17 | uses: localagi/ai-dedicated-workflows/.github/workflows/operation-docker-build-publish.yml@v2 18 | with: 19 | registry-repo-name: gpt-code-ui 20 | context-repository: ricklamers/gpt-code-ui 21 | context-repository-ref: ${{ github.ref_name }} 22 | registry-readme: README.docker.md 23 | tags: | 24 | type=schedule 25 | type=ref,event=branch 26 | type=semver,pattern={{version}} 27 | platforms: linux/amd64,linux/arm64/v8 28 | secrets: inherit 29 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10-slim-buster 2 | 3 | RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ 4 | apt-get update ; \ 5 | apt-get upgrade -y ; \ 6 | apt-get install -y wget python3 python3-pip 7 | 8 | RUN pip3 install --upgrade pip wheel 9 | 10 | ####### prepare NODE NVM SETUP 11 | ENV NVM_DIR /usr/local/nvm 12 | ENV NODE_VERSION lts/hydrogen 13 | 14 | RUN mkdir -p $NVM_DIR 15 | 16 | SHELL ["/bin/bash", "-o", "pipefail", "-c"] 17 | 18 | # see https://github.com/nvm-sh/nvm 19 | RUN wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash 20 | 21 | # install node and npm LTS 22 | RUN source $NVM_DIR/nvm.sh \ 23 | && nvm install $NODE_VERSION \ 24 | && nvm use $NODE_VERSION 25 | ####### 26 | 27 | ####### add node and npm to path so the commands are available 28 | ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules 29 | ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH 30 | ####### 31 | 32 | COPY --link . /gpt-code-ui 33 | WORKDIR /gpt-code-ui 34 | 35 | # prereqs for gpt-code-ui 36 | RUN apt install -y rsync socat 37 | 38 | RUN source $NVM_DIR/nvm.sh && make build 39 | 40 | RUN python3 setup.py install 41 | 42 | EXPOSE 8080 43 | ENV APP_HOST= 44 | 45 | ENTRYPOINT socat TCP-LISTEN:8080,fork,bind=${APP_HOST} TCP:127.0.0.1:8080 & gptcode 46 | 47 | 48 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 localagi 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.docker.md: -------------------------------------------------------------------------------- 1 | See https://github.com/localagi/gpt-code-ui-docker 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # gpt-code-ui-docker 2 | 3 | Sophisticated docker builds for parent project [ricklamers/gpt-code-ui](https://github.com/ricklamers/gpt-code-ui). 4 | 5 | ![example workflow](https://github.com/localagi/gpt-code-ui-docker/actions/workflows/publish-docker.yml/badge.svg?branch=main) 6 | 7 | Easy setup. Compatible. Tweakable. Scaleable. 8 | 9 | #### Supported platforms 10 | `amd64`, `arm64` 11 | 12 | #### Supported versions 13 | Containers follow the version scheme of the parent project 14 | 15 | `main` (default), `0.42.14`, etc. 16 | 17 | See [Releases](../../releases) 18 | 19 | ## Prerequisites 20 | 21 | * `docker` and `docker compose` are available on your system 22 | 23 | ## Run 24 | 25 | * get `docker-compose.yml` 26 | * update `OPENAI_API_KEY` in this file 27 | * `docker compose up` from same dir 28 | * open `http://localhost:8080` 29 | 30 | ### Runtime options 31 | Environment variables to set for the specific service 32 | 33 | #### version selection `GPTCODEUI_VERSION` 34 | Prepend, e.g. `GPTCODEUI_VERSION=0.42.14` 35 | 36 | 37 | ### Get the latest builds / update 38 | `docker compose pull` 39 | 40 | ### Cleanup 41 | `docker compose rm` 42 | 43 | ## Contributing 44 | 45 | When there is a new version and there is need of builds or you require the latest main build, feel free to open an issue 46 | 47 | ## Problems? 48 | 49 | Open an issue on the [Issue Tracker](../../issues) 50 | 51 | ## Limitations 52 | We cannot support issues regarding the base software. Please refer to the main project page mentioned in the second line of this card. 53 | -------------------------------------------------------------------------------- /docker-compose.yaml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | services: 3 | 4 | gpt-code-ui: 5 | image: localagi/gpt-code-ui:${GPTCODEUI_VERSION:-main} 6 | environment: 7 | OPENAI_API_KEY: "your open ai key" 8 | APP_HOST: gpt-code-ui 9 | ports: 10 | - "8080:8080" 11 | --------------------------------------------------------------------------------