Created
March 5, 2024 14:22
-
-
Save darkacorn/09378d3520690d03169f89183adebe9c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian:bullseye-slim | |
LABEL maintainer="FoxEngine-AI <info@foxengine.ai>" | |
RUN apt-get update && apt-get install -y --no-install-recommends gettext-base wget git ca-certificates build-essential jq && apt-get clean \ | |
&& rm -r /var/lib/apt/lists/* /var/cache/* | |
#RUN wget https://letsencrypt.org/certs/isrg-root-x1-cross-signed.pem | |
#RUN cp isrg-root-x1-cross-signed.pem /etc/ssl/certs/ | |
COPY ./set_hf.sh /set_hf.sh | |
#RUN mkdir /opt/conda && wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh /opt/conda/miniconda.sh | |
COPY ./Miniconda3-latest-Linux-x86_64.sh /opt/conda/miniconda.sh | |
RUN bash /opt/conda/miniconda.sh -b -p /opt/miniconda && chmod +x /set_hf.sh | |
RUN /opt/miniconda/bin/conda init bash | |
RUN /opt/miniconda/bin/conda create -y -n FoxEngine python=3.10 | |
RUN echo "source activate FoxEngine" >> ~/.bashrc | |
RUN /bin/bash -c "source /opt/miniconda/bin/activate FoxEngine && pip install -U "huggingface_hub[cli]" hf_transfer protobuf numpy sentencepiece auto-gptq --extra-index-url https://huggingface.github.io/autogptq-index/whl/cu118/" | |
RUN /bin/bash -c "export HF_HUB_ENABLE_HF_TRANSFER=1" | |
WORKDIR / | |
RUN git clone https://github.com/ggerganov/llama.cpp.git app | |
WORKDIR /app | |
RUN make | |
RUN git clone https://github.com/casper-hansen/AutoAWQ.git /app/AutoAWQ | |
WORKDIR /app/AutoAWQ | |
RUN /bin/bash -c "source /opt/miniconda/bin/activate FoxEngine && pip install -e ." | |
WORKDIR /app | |
#RUN mkdir /app/in_model | |
#RUN mkdir -p /app/out_model/awq | |
#RUN huggingface-cli download mistralai/Mistral-7B-Instruct-v0.2 --local-dir in_model | |
#RUN python convert.py ./in_model --outfile ./out_model/model.fp16.gguf | |
#echo $JSON_ARRAY | jq -r '.[] | select(.algo=="gguf") | .versions[]' | while read version; do | |
# ./quantize ./out_model/model.fp16.gguf model_${version}.gguf ${version} | |
# echo done ${version} | |
#done | |
#python auto_awq.py -k GEMM -b 4 -g 128 -z True, -p "Mistral-7B-Instruct-v0.2" | |
#huggingface-cli upload --repo-type model FoxEngineAi/Mistral-7B-Instruct-v0.2-awq_gemv_fast out_model/awq/Mistral-7B-Instruct-v0.2_GEMM_4_128_True.awq | |
#python auto_awq.py -k gemv_fast -b 4 -g 128 -z True, -p "Mistral-7B-Instruct-v0.2" | |
COPY ./auto_awq.py /app/auto_awq.py | |
CMD ["/bin/bash"] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment