forked from BloopAI/bloop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitpod.yml
81 lines (65 loc) · 2.43 KB
/
.gitpod.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# This configuration file was automatically generated by Gitpod.
# Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml)
# and commit this file to your remote git repository to share the goodness with others.
# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart
image:
file: .gitpod.Dockerfile
ports:
- name: Bloop Web Interface
port: 7878
protocol: http
additionalRepositories:
- url: https://github.com/bloopai/answer-api
checkoutLocation: answer-api
tasks:
- name: Backend
init: |
nix run nixpkgs#cachix use bloopai
# Setup Git LFS
git lfs pull model
git lfs install --skip-smudge
# Cache build artifacts
nix develop -c cargo build --locked -p bleep
nix develop -c npm i
# this is working around a gitpod bug
# https://github.com/gitpod-io/gitpod/issues/524
cp -a ~/.cargo .
tar czpf /workspace/target.tar.gz target .cargo
rm -rf .cargo target
command: |
tar -C /workspace -xzpf /workspace/target.tar.gz
rm -rf ~/.cargo target
mv /workspace/.cargo ~
mv /workspace/target .
echo "$BLOOP_GITHUB_SECRET_KEY" |base64 -d > /workspace/github-app-private-key.pem
bloop_url=$(gp url 7878 | sed 's;https://;;')
git reset --hard
nix develop -c cargo watch -w server -- \
cargo run --locked --features=ee -p bleep -- \
\
--qdrant-url http://localhost:6334 \
--answer-api-url http://localhost:7879 \
--model-dir /workspace/bloop/model \
--frontend-dist /workspace/bloop/client/dist \
--instance-domain $bloop_url \
--github-app-id $BLOOP_GITHUB_APP_ID \
--github-app-install-id $BLOOP_GITHUB_APP_INSTALL_ID \
--github-client-id $BLOOP_GITHUB_CLIENT_ID \
--github-client-secret $BLOOP_GITHUB_CLIENT_SECRET \
--github-app-private-key /workspace/github-app-private-key.pem
openMode: split-left
- name: Frontend
command: |
nix develop -c npm i
nix develop -c npm run build-web -- -- --watch
openMode: split-right
- name: Qdrant
command: |
nix run nixpkgs#qdrant -- --config-path qdrant/config.yaml
openMode: tab-after
- name: answer-api
command: |
cd /workspace/answer-api
git checkout nix-cachix
nix run /workspace/answer-api?ref=origin/nix-cachix#
openMode: tab-after