Download Dockerfile from tungdop2/T2IPromptGeneratorQT: direct link, hf CLI and curl.
- Browser
- Download file 1.72 kB
-
https://huggingface.co/spaces/tungdop2/T2IPromptGeneratorQT/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/tungdop2/T2IPromptGeneratorQT/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/tungdop2/T2IPromptGeneratorQT/resolve/main/Dockerfile
1.72 kB
| FROM ubuntu:22.04 | |
| RUN apt-get update -y \ | |
| && apt-get install -y curl git wget vim numactl gcc-12 g++-12 python3 python3-pip libtcmalloc-minimal4 libnuma-dev \ | |
| && update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 10 --slave /usr/bin/g++ g++ /usr/bin/g++-12 | |
| # https://intel.github.io/intel-extension-for-pytorch/cpu/latest/tutorials/performance_tuning/tuning_guide.html | |
| # intel-openmp provides additional performance improvement vs. openmp | |
| # tcmalloc provides better memory allocation efficiency, e.g, holding memory in caches to speed up access of commonly-used objects. | |
| RUN pip install intel-openmp | |
| ENV LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libtcmalloc_minimal.so.4:/usr/local/lib/libiomp5.so:$LD_PRELOAD" | |
| RUN echo 'ulimit -c 0' >> ~/.bashrc | |
| RUN pip install https://intel-extension-for-pytorch.s3.amazonaws.com/ipex_dev/cpu/intel_extension_for_pytorch-2.4.0%2Bgitfbaa4bc-cp310-cp310-linux_x86_64.whl | |
| RUN pip install --upgrade pip \ | |
| && pip install wheel packaging ninja "setuptools>=49.4.0" numpy | |
| COPY ./ /workspace | |
| # Create a directory for usage statistics with appropriate permissions | |
| RUN mkdir -p /workspace/.config && chmod -R 777 /workspace/.config | |
| # Set the environment variable to use the new directory | |
| ENV XDG_CONFIG_HOME=/workspace/.config | |
| WORKDIR /workspace/vllm | |
| RUN pip install -v -r requirements-cpu.txt --extra-index-url https://download.pytorch.org/whl/test/cpu | |
| ARG VLLM_CPU_DISABLE_AVX512 | |
| ENV VLLM_CPU_DISABLE_AVX512=${VLLM_CPU_DISABLE_AVX512} | |
| RUN VLLM_TARGET_DEVICE=cpu python3 setup.py install | |
| WORKDIR /workspace/ | |
| RUN ln -s /workspace/vllm/tests && ln -s /workspace/vllm/examples && ln -s /workspace/vllm/benchmarks | |
| CMD ["/bin/bash", "/workspace/start_vllm.sh"] | |