mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2024-12-20 21:03:07 +00:00
docker: move venv to runtime
This commit is contained in:
parent
aea0c74648
commit
d844f5ba73
@ -3,8 +3,6 @@ FROM python:3.10
|
|||||||
WORKDIR /srv
|
WORKDIR /srv
|
||||||
COPY ./requirements.txt .
|
COPY ./requirements.txt .
|
||||||
|
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
|
||||||
|
|
||||||
COPY ./app.py /srv/app.py
|
COPY ./app.py /srv/app.py
|
||||||
COPY ./api /srv/api
|
COPY ./api /srv/api
|
||||||
COPY ./static /srv/static
|
COPY ./static /srv/static
|
||||||
@ -17,8 +15,12 @@ COPY ./.git /srv/.git
|
|||||||
|
|
||||||
VOLUME [ "/data" ]
|
VOLUME [ "/data" ]
|
||||||
|
|
||||||
# Monkey-patch: send a "enter" keystroke to python to confirm the first launch process
|
# 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", " \
|
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' | \
|
echo -ne '\n' | \
|
||||||
python app.py \
|
python app.py \
|
||||||
--host 0.0.0.0 \
|
--host 0.0.0.0 \
|
||||||
|
Loading…
Reference in New Issue
Block a user