35 lines
1.1 KiB
Docker
35 lines
1.1 KiB
Docker
# Agenten Plattform
|
|
#
|
|
# (c) 2024 Magnus Bender
|
|
# Institute of Humanities-Centered Artificial Intelligence (CHAI)
|
|
# Universitaet Hamburg
|
|
# https://www.chai.uni-hamburg.de/~bender
|
|
#
|
|
# source code released under the terms of GNU Public License Version 3
|
|
# https://www.gnu.org/licenses/gpl-3.0.txt
|
|
|
|
ARG FROM_IMAGE
|
|
FROM $FROM_IMAGE
|
|
|
|
ARG PIP_REQ_FILE
|
|
|
|
USER root
|
|
RUN mkdir -p /ums-agenten/plattform/ && mkdir -p /ums-agenten/persist/
|
|
|
|
COPY ./utils/agent/$PIP_REQ_FILE /ums-agenten/requirements.txt
|
|
RUN pip3 install --break-system-packages --no-cache-dir -r /ums-agenten/requirements.txt \
|
|
&& pip3 freeze -q -r /ums-agenten/requirements.txt > /ums-agenten/requirements-frozen.txt
|
|
|
|
# install the code of the repo
|
|
COPY ./utils/setup.py /ums-agenten/plattform/
|
|
RUN pip3 install --break-system-packages -e /ums-agenten/plattform/
|
|
|
|
COPY --chown=user:user ./ums/ /ums-agenten/plattform/ums/
|
|
COPY --chown=user:user ./web/ /ums-agenten/plattform/web/
|
|
|
|
WORKDIR /ums-agenten/plattform/ums/
|
|
RUN chown -R user:user /ums-agenten
|
|
USER user
|
|
|
|
ENV SERVE=true
|
|
CMD ["/usr/local/bin/uvicorn", "ums.agent.main:app", "--host", "0.0.0.0", "--port", "8000"] |