w1r4 commited on
Commit
df6d8c7
·
1 Parent(s): d9c0e70

Upload 2 files

Browse files
Files changed (2) hide show
  1. Dockerfile +47 -0
  2. docker-compose.yaml +10 -0
Dockerfile ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+
docker-compose.yaml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
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"