Skip to content

Commit 8745555

Browse files
author
Your Name
committed
codebase
1 parent 6affcc3 commit 8745555

File tree

5 files changed

+112
-1
lines changed

5 files changed

+112
-1
lines changed

Diff for: .github/workflows/release-docker.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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@main
18+
with:
19+
registry-dockerhub-enable: false
20+
registry-repo-name: gpt-code-ui
21+
tags: |
22+
type=schedule
23+
type=ref,event=branch
24+
type=semver,pattern={{version}}
25+
platforms: linux/amd64,linux/arm64/v8
26+
secrets: inherit

Diff for: Dockerfile

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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 git 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+
ARG GPTCODEUI_VERSION="main"
33+
RUN git clone -b "$GPTCODEUI_VERSION" --depth 1 https://github.com/ricklamers/gpt-code-ui
34+
WORKDIR /gpt-code-ui
35+
36+
# prereqs for gpt-code-ui
37+
RUN apt install -y rsync socat
38+
39+
RUN source $NVM_DIR/nvm.sh && make build
40+
41+
RUN python3 setup.py install
42+
43+
EXPOSE 8080
44+
ENV APP_HOST=
45+
46+
ENTRYPOINT socat TCP-LISTEN:8080,fork,bind=${APP_HOST} TCP:127.0.0.1:8080 & gptcode
47+
48+

Diff for: LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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.

Diff for: README.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1-
# gpt-code-ui-docker
1+
# gpt-code-ui-docker
2+
Docker builds for https://github.com/ricklamers/gpt-code-ui
3+
4+
# Run
5+
* get `docker-compose.yml`
6+
* update `OPENAI_API_KEY` in this file
7+
* `docker compose up` from same dir

Diff for: docker-compose.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: "3.8"
2+
services:
3+
4+
gpt-code-ui:
5+
image: ghcr.io/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"

0 commit comments

Comments
 (0)