diff --git a/docker-standalone/Dockerfile.base b/docker-standalone/Dockerfile.base new file mode 100644 index 00000000..efa5c319 --- /dev/null +++ b/docker-standalone/Dockerfile.base @@ -0,0 +1,8 @@ +FROM debian +WORKDIR /opt/koboldai +COPY ./environments /opt/koboldai/environments +COPY ./install_requirements.sh /opt/koboldai +USER root +RUN apt update && apt install wget aria2 git bzip2 -y +RUN ./install_requirements.sh cuda +ENV PATH=/opt/conda/bin/:$PATH diff --git a/docker-standalone/Dockerfile.koboldai b/docker-standalone/Dockerfile.koboldai new file mode 100644 index 00000000..6121c838 --- /dev/null +++ b/docker-standalone/Dockerfile.koboldai @@ -0,0 +1,13 @@ +FROM ebolam/koboldai_base +EXPOSE 5000/tcp +ENV remote=true +ENV quiet=true +ENV override_delete=true +ENV override_rename=true +ENV update=true +RUN apt-get install python3 python3-venv -y +RUN python3 -m venv /opt/koboldai/KoboldAI-Horde/venv +COPY ./KoboldAI-Horde/requirements.txt /opt/koboldai/KoboldAI-Horde/ +RUN /opt/koboldai/KoboldAI-Horde/venv/bin/pip install -r /opt/koboldai/KoboldAI-Horde/requirements.txt +COPY . /opt/koboldai +CMD ./docker-standalone/docker-helper.sh \ No newline at end of file diff --git a/docker-standalone/docker-helper_new.sh b/docker-standalone/docker-helper_new.sh new file mode 100644 index 00000000..01827d20 --- /dev/null +++ b/docker-standalone/docker-helper_new.sh @@ -0,0 +1,21 @@ +#!/bin/bash +cd /opt/koboldai +if [[ -n update ]];then + git pull +fi + +#The goal here is to allow any directory in /content to be mapped to the appropriate dir in the koboldai dir +if [[ ! -d "/content" ]];then + mkdir /content +fi + +for FILE in *;do + if [[ -d "/opt/koboldai/$FILE" ]];then + rm -rf /opt/koboldai/$FILE + fi + ln -s /content/$FILE /opt/koboldai/$FILE +done + + +#Previous parameters are now env vars in the docker container so they can be overwritten as desired +PYTHONUNBUFFERED=1 ./play.sh