Spaces:
Runtime error
Runtime error
FROM nvidia/cuda:11.8.0-devel-ubuntu22.04 | |
RUN apt update && apt install -y \ | |
git \ | |
build-essential \ | |
libopenblas-dev \ | |
wget \ | |
python3-pip \ | |
nodejs \ | |
npm | |
RUN useradd -m -u 1000 user | |
USER user | |
ENV HOME=/home/user \ | |
PATH=/home/user/.local/bin:$PATH | |
WORKDIR $HOME/app | |
COPY --chown=user . $HOME/app | |
# Install aphrodite-engine normally | |
RUN python3 -m pip install aphrodite-engine | |
# Clone the specific branch of aphrodite-engine | |
RUN git clone --branch feat/exllamav2 https://github.com/PygmalionAI/aphrodite-engine.git $HOME/aphrodite-engine | |
# Use Python to find the installation directory of aphrodite-engine and copy the files over | |
RUN python3 -c "import os, aphrodite; print(os.path.dirname(aphrodite.__file__))" > aphrodite_path.txt | |
RUN APHRODITE_PATH=$(cat aphrodite_path.txt) && cp -r /home/user/aphrodite-engine/* $APHRODITE_PATH | |
RUN pip install huggingface-hub hf-transfer | |
ENV HF_HUB_ENABLE_HF_TRANSFER=1 | |
RUN huggingface-cli download LoneStriker/TinyLlama-1.1B-32k-Instruct-8.0bpw-h8-exl2 --local-dir $HOME/goliath-gptq --local-dir-use-symlinks False --cache-dir $HOME/cache | |
EXPOSE 7860 | |
CMD /bin/bash -c "/bin/python3 -m aphrodite.endpoints.openai.api_server $ENGINE_ARGS --port 7860 --host 0.0.0.0 --model ~/goliath-gptq" |