-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from silvanmelchior/new-deployment
New deployment
- Loading branch information
Showing
22 changed files
with
107 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.0.0 | ||
2.0.0b1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,30 @@ | ||
ARG INTERPRETER_IMAGE | ||
FROM $INTERPRETER_IMAGE | ||
SHELL ["/bin/bash", "-c"] | ||
|
||
RUN apt update && apt install -y nodejs npm | ||
FROM node:18-alpine | ||
|
||
WORKDIR /opt/app | ||
|
||
COPY interpreter interpreter | ||
RUN python3 -m venv venv_backend && \ | ||
source venv_backend/bin/activate && \ | ||
pip3 install ./interpreter | ||
|
||
COPY ui ui | ||
COPY VERSION VERSION | ||
|
||
RUN cd ui && \ | ||
npm install && \ | ||
npm run build && \ | ||
cd .. | ||
npm run build | ||
|
||
FROM $INTERPRETER_IMAGE | ||
SHELL ["/bin/bash", "-c"] | ||
|
||
WORKDIR /opt/app | ||
COPY --from=0 /opt/app/ui/out /opt/app/ui | ||
|
||
RUN apt update && apt install -y nginx | ||
|
||
COPY services services | ||
RUN python3 -m venv venv_services && \ | ||
source venv_services/bin/activate && \ | ||
pip3 install ./services | ||
|
||
COPY docker/nginx.conf /etc/nginx/ | ||
|
||
COPY VERSION VERSION | ||
COPY docker/start* . | ||
RUN chmod 755 start* | ||
CMD ["/opt/app/start.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
user www-data; | ||
worker_processes auto; | ||
pid /run/nginx.pid; | ||
include /etc/nginx/modules-enabled/*.conf; | ||
|
||
events { | ||
worker_connections 768; | ||
} | ||
|
||
http { | ||
sendfile on; | ||
tcp_nopush on; | ||
types_hash_max_size 2048; | ||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
|
||
server { | ||
listen 80; | ||
listen [::]:80; | ||
|
||
root /opt/app/ui; | ||
index index.html index.htm index.nginx-debian.html; | ||
|
||
location /api/llm { | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection "Upgrade"; | ||
proxy_pass http://localhost:8081; | ||
} | ||
|
||
location /api/interpreter { | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection "Upgrade"; | ||
proxy_pass http://localhost:8080; | ||
} | ||
|
||
location / { | ||
try_files $uri $uri/ =404; | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
#!/bin/bash | ||
|
||
/opt/app/start_interpreter.sh & | ||
/opt/app/start_ui.sh | ||
/opt/app/start_llm.sh & | ||
|
||
nginx -g "daemon off;" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
#!/bin/bash | ||
|
||
cd /opt/app | ||
. venv_backend/bin/activate | ||
cd interpreter | ||
. venv_services/bin/activate | ||
cd services | ||
|
||
mkdir -p /mnt/data | ||
export WORKING_DIRECTORY=/mnt/data | ||
export IPYTHON_PATH=/opt/app/venv_interpreter/bin/ipython | ||
|
||
uvicorn main:app --host 0.0.0.0 --port 3031 | ||
uvicorn main_interpreter:app --host 0.0.0.0 --port 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
cd /opt/app | ||
. venv_services/bin/activate | ||
cd services | ||
|
||
uvicorn main_llm:app --host 0.0.0.0 --port 8081 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = {}; | ||
const nextConfig = { | ||
output: "export", | ||
}; | ||
|
||
module.exports = nextConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
File renamed without changes