-
-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy path.gitpod.yml
71 lines (69 loc) · 2.72 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
image:
file: .gitpod.Dockerfile
tasks:
- init: |
echo "Gitpod init. Setting up ambianic-edge dev environment."
touch /tmp/.gitpod-init-lock
pyenv global system
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade setuptools
echo "Installing pre-commit hooks."
export PIP_USER=false
python3 -m pip install -U --user pre-commit
pre-commit install
pre-commit autoupdate
# installing and upgrading requirements.txt packages
sudo
# convoluted way to install and upgrade requirements.txt packages without failing if one errors
# ref: https://stackoverflow.com/questions/22250483/stop-pip-from-failing-on-single-package-when-installing-with-requirements-txt
cat ./build/requirements.txt | sudo xargs -n 1 python3 -m pip install --upgrade
echo "Installing local ambianic-edge package from ./src"
python3 -m pip install --user -e ./src
# set local config file list for ambianic env settings
rm /tmp/.gitpod-init-lock
command: |
source ./.gitpod.env.sh
- init: |
echo "Waiting for main init to complete"
sleep 1 && while [ -f /tmp/.gitpod-init-lock ]; do sleep 1; done
command: |
echo "Starting amgianic-edge core"
pyenv global system
source ./.gitpod.env.sh
sudo mkdir /opt/ambianic-edge/
sudo ln -s /workspace/ambianic-edge/ai_models/ /opt/ambianic-edge/ai_models
sudo ln -s /workspace/ambianic-edge/.peerjsrc /workspace/ambianic-edge/.peerjsrc.json
python3 -m ambianic
- init: |
echo "Waiting for main init to complete"
sleep 1 && while [ -f /tmp/.gitpod-init-lock ]; do sleep 1; done
command: |
echo "Starting WebRTC to HTTP proxy"
pyenv global system
source ./.gitpod.env.sh
python3 -m peerjs.ext.http_proxy
- init: |
echo "Waiting for main init to complete"
sleep 1 && while [ -f /tmp/.gitpod-init-lock ]; do sleep 1; done
command: |
echo "Starting OpenAPI server (fastapi/uvicorn)"
pyenv global system
source ./.gitpod.env.sh
python3 -m uvicorn ambianic.webapp.fastapi_app:app --reload --port 8778 --log-level debug
- init: |
echo "Waiting for main init to complete"
sleep 1 && while [ -f /tmp/.gitpod-init-lock ]; do sleep 1; done
command: |
echo "Running code linting:"
pyenv global system
pre-commit run --all-files
echo "Running ambianic-edge testsuite:"
source ./.gitpod.env.sh
sudo python3 -m pip install pytest pytest-mock pytest-cov
python3 -m pytest -v --log-cli-level=DEBUG --cov=ambianic --cov-report=term tests/
vscode:
extensions:
- ms-python.python
- github.vscode-pull-request-github
- eamodio.gitlens
#