Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run KoboldAI without Cloudflare #326

Open
Joly0 opened this issue Apr 6, 2023 · 1 comment
Open

Run KoboldAI without Cloudflare #326

Joly0 opened this issue Apr 6, 2023 · 1 comment

Comments

@Joly0
Copy link

Joly0 commented Apr 6, 2023

Hey, i have built my own docker container based on the standalone and the rocm container from here and it is working so far, but i would really like to run this without cloudflare, just locally.
If i try to access the webui locally with the local ip and the assigned port, i just get a "not found" error, but trying to run it through the link from the logs (which is a trycloudflare link) it works no problem, but i dont want to have this running through cloudflare, i just want local access.

So how can i do this?

Here is the dockerfile i used:
FROM debian RUN apt update && apt install wget aria2 git bzip2 -y RUN git clone --recursive https://github.com/henk717/koboldai /opt/koboldai WORKDIR /opt/koboldai RUN ./install_requirements.sh rocm COPY docker-helper.sh /opt/koboldai/docker-helper.sh RUN chmod +x /opt/koboldai/docker-helper.sh EXPOSE 5000/tcp CMD /opt/koboldai/docker-helper.sh

And the docker-helper.sh script:
#!/bin/bash cd /opt/koboldai

if [[ -n update ]];then git pull --recurse-submodules && ./install_requirements.sh rocm git submodule update --init --recursive fi

if [[ ! -v KOBOLDAI_DATADIR ]];then mkdir /content KOBOLDAI_DATADIR=/content fi

mkdir $KOBOLDAI_DATADIR/stories mkdir $KOBOLDAI_DATADIR/settings mkdir $KOBOLDAI_DATADIR/softprompts mkdir $KOBOLDAI_DATADIR/userscripts mkdir $KOBOLDAI_DATADIR/presets mkdir $KOBOLDAI_DATADIR/themes

cp -rn stories/* $KOBOLDAI_DATADIR/stories/ cp -rn userscripts/* $KOBOLDAI_DATADIR/userscripts/ cp -rn softprompts/* $KOBOLDAI_DATADIR/softprompts/ cp -rn presets/* $KOBOLDAI_DATADIR/presets/ cp -rn themes/* $KOBOLDAI_DATADIR/themes/

if [[ -v KOBOLDAI_MODELDIR ]];then mkdir $KOBOLDAI_MODELDIR/models mkdir $KOBOLDAI_MODELDIR/functional_models rm models rm -rf models/ ln -s $KOBOLDAI_MODELDIR/models/ models ln -s $KOBOLDAI_MODELDIR/functional_models/ functional_models fi

for FILE in $KOBOLDAI_DATADIR* do FILENAME="$(basename $FILE)" rm /opt/koboldai/$FILENAME rm -rf /opt/koboldai/$FILENAME ln -s $FILE /opt/koboldai/ done

PYTHONUNBUFFERED=1 ./play-rocm.sh --remote --quiet --override_delete --override_rename

which is located right beside the dockerfile.
The finished docker container is found here https://hub.docker.com/r/joly0/koboldai-rocm
And here is the docker run command:
docker run -d --name='KoboldAI' --net='bridge' -p '5000:5000/tcp' -v '/koboldai-content/':'/content':'rw' --device='/dev/kfd' --device='/dev/dri' 'joly0/koboldai-rocm'

@YellowRoseCx
Copy link

Change --remote to --host

PYTHONUNBUFFERED=1 ./play-rocm.sh --remote --quiet --override_delete --override_rename

PYTHONUNBUFFERED=1 ./play-rocm.sh --host --quiet --override_delete --override_rename

There's a pending pull request to add ip whitelisting too

Aquilae00 pushed a commit to Aquilae00/KoboldAI that referenced this issue Apr 25, 2023
Fix for flakey button click
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants