forked from ParisNeo/lollms-webui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
30 lines (25 loc) · 879 Bytes
/
Dockerfile
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
FROM python:3.10
WORKDIR /srv
COPY ./requirements.txt .
COPY ./app.py /srv/app.py
COPY ./api /srv/api
COPY ./static /srv/static
COPY ./templates /srv/templates
COPY ./web /srv/web
COPY ./assets /srv/assets
# TODO: this is monkey-patch for check_update() function, should be disabled in Docker
COPY ./.git /srv/.git
VOLUME [ "/data" ]
# Monkey-patch (1): because "binding_zoo" install the packets inside venv, we cannot do pip install on build time
# Monkey-patch (2): send a "enter" keystroke to python to confirm the first launch process
CMD ["/bin/bash", "-c", " \
python -m venv /data/venv; \
source /data/venv/bin/activate; \
python -m pip install --no-cache-dir -r requirements.txt --upgrade pip; \
echo -ne '\n' | \
python app.py \
--host 0.0.0.0 \
--port 9600 \
--db_path /data/Documents/databases/database.db \
--config /configs/config.yaml \
"]