FROM nvidia/cuda:11.8.0-devel-ubuntu22.04 # Install necessary packages RUN apt update && apt install git build-essential libopenblas-dev wget python3-pip -y RUN apt update && apt install -y wget RUN apt-get install -y nodejs npm RUN npm install -g localtunnel # Set up a new user named "user" with user ID 1000 RUN useradd -m -u 1000 user # Switch to the "user" user USER user # Set home to the user's home directory ENV HOME=/home/user \ PATH=/home/user/.local/bin:$PATH # Set the working directory to the user's home directory WORKDIR $HOME/app # Copy the current directory contents into the container at $HOME/app setting the owner to the user COPY --chown=user . $HOME/app RUN python3 -m pip install aphrodite-engine Run git clone https://github.com/lolcats399/aphrodite-engine RUN pip install huggingface-hub hf-transfer ENV HF_HUB_ENABLE_HF_TRANSFER=1 RUN huggingface-cli download TheBloke/goliath-120b-gptq --local-dir ~/goliath-gptq --local-dir-use-symlinks False --cache-dir ~/cache RUN echo "#!/bin/bash" > startup.sh RUN echo "lt --port 7860 &" >> startup.sh RUN echo "public_ip=\$(wget -qO- https://loca.lt/mytunnelpassword)" >> startup.sh RUN echo "echo \"Public IP: \$public_ip\"" >> startup.sh RUN chmod +x startup.sh CMD /bin/bash -c "./startup.sh && python3 $HOME/app/aphrodite-engine/aphrodite/endpoints/kobold/api_server.py $ENGINE_ARGS --port 7860 -h --model ~/goliath-gptq"