lollms-webui/Dockerfile

31 lines
890 B
Docker
Raw Normal View History

2023-04-06 19:12:49 +00:00
FROM python:3.10
WORKDIR /srv
COPY ./requirements.txt .
COPY ./app.py /srv/app.py
2023-05-24 15:34:12 +00:00
COPY ./api /srv/api
2023-04-06 19:12:49 +00:00
COPY ./static /srv/static
COPY ./templates /srv/templates
COPY ./web /srv/web
COPY ./assets /srv/assets
2023-04-06 19:12:49 +00:00
2023-08-29 20:39:37 +00:00
# TODO: this is monkey-patch for check_update() function, should be disabled in Docker
COPY ./.git /srv/.git
VOLUME [ "/data" ]
2023-08-29 20:58:42 +00:00
# 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
2023-08-29 20:39:37 +00:00
CMD ["/bin/bash", "-c", " \
2023-08-29 20:58:42 +00:00
python -m venv /data/venv; \
source /data/venv/bin/activate; \
python -m pip install --no-cache-dir -r requirements.txt --upgrade pip; \
2023-08-29 20:39:37 +00:00
echo -ne '\n' | \
python app.py \
--host 0.0.0.0 \
--port 9600 \
2024-02-18 23:23:15 +00:00
--discussion_db_name /data/Documents/databases/database.db \
2023-08-29 20:39:37 +00:00
--config /configs/config.yaml \
"]