forked from luijait/DarkGPT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
81 lines (58 loc) · 2.58 KB
/
makefile
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
all: setup container-build container-vulns size container-run
setup: requirements install_python install validate_python_libs
container: container-build container-vulns size container-run
container-non-bash: container-build-non-bash container-vulns-non-bash size container-run-non-bash
code:
poetry run code .
pycharm:
poetry run pycharm .
# run -------------------------------
run:
docker run -it --env-file .env aironman/aironmangpt:latest
# Dependency utils -------------------------------
install_python:
pyenv install $$(cat .python-version) -s
requirements:
which docker
which pyenv
which poetry
validate_python_libs:
poetry run python3 -c "import streamlit as st; print('Version de Streamlit:', st.__version__)";
poetry run python3 -c "import embedchain as ec; print('Version de EmbedChain:', ec.__version__)";
# Python libraries ----------------------------------------
update:
poetry update
install:
poetry install --no-root
show:
poetry show
info:
poetry run poetry env info -p
delete:
poetry env remove python
size:
@echo "Size of Python virtual environment"
@du -sh $(poetry run poetry env info --path 2>/dev/null)
# Container targets ------------------------------------------
CONTAINER_IMAGE=aironman/aironmangpt:latest
# build the container image
container-build:
@echo "Building container image"
docker build -f Dockerfile -t aironman/aironmangpt:0.0.1 .
container-build-non-bash:
@echo "Building container image non bash"
docker build -f Dockerfile-non-bash -t aironman/aironmangpt-non-bash:0.0.1 .
container-run:
docker run --rm -it --user appuser --net host --cap-add NET_ADMIN --cap-add NET_RAW --cap-add SYS_ADMIN --device /dev/net/tun -v /sys/class/net:/sys/class/net:ro -v /usr/lib/modules:/usr/lib/modules:ro -v /tmp:/app --env-file .env aironman/aironmangpt:0.0.1
container-run-non-bash:
docker run --rm -it --user appuser --net host --cap-add NET_ADMIN --cap-add NET_RAW --cap-add SYS_ADMIN --device /dev/net/tun -v /sys/class/net:/sys/class/net:ro -v /usr/lib/modules:/usr/lib/modules:ro -v /tmp:/app --env-file .env aironman/aironmangpt-non-bash:0.0.1
container-vulns:
docker scout quickview aironman/aironmangpt:0.0.1
docker scout cves aironman/aironmangpt:0.0.1
docker scout recommendations aironman/aironmangpt:0.0.1
docker scout quickview aironman/aironmangpt:0.0.1 --org aironman
container-vulns-non-bash:
docker scout quickview aironman/aironmangpt-non-bash:0.0.1
docker scout cves aironman/aironmangpt-non-bash:0.0.1
docker scout recommendations aironman/aironmangpt-non-bash:0.0.1
docker scout quickview aironman/aironmangpt-non-bash:0.0.1 --org aironman