Spaces:
Build error
Build error
Download Dockerfile from zerrin/LLM-Server: direct link, hf CLI and curl.
- Browser
- Download file 1.91 kB
-
https://huggingface.co/spaces/zerrin/LLM-Server/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/zerrin/LLM-Server/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/zerrin/LLM-Server/resolve/main/Dockerfile
1.91 kB
| FROM nvidia/cuda:11.3.1-base-ubuntu20.04 | |
| RUN rm -f /etc/apt/sources.list.d/*.list && \ | |
| apt-get update && apt-get install -y --no-install-recommends \ | |
| curl \ | |
| ca-certificates \ | |
| sudo \ | |
| git \ | |
| wget \ | |
| procps \ | |
| git-lfs \ | |
| zip \ | |
| unzip \ | |
| htop \ | |
| vim \ | |
| nano \ | |
| bzip2 \ | |
| libx11-6 \ | |
| build-essential \ | |
| libsndfile-dev \ | |
| software-properties-common \ | |
| && rm -rf /var/lib/apt/lists/* | |
| RUN echo "user ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/90-user | |
| RUN mkdir /home/user/.cache /home/user/.config && chmod -R 777 /home/user | |
| WORKDIR /app | |
| RUN curl -sLo ~/miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-py39_4.10.3-Linux-x86_64.sh && \ | |
| chmod +x ~/miniconda.sh && \ | |
| ~/miniconda.sh -b -p ~/miniconda && \ | |
| rm ~/miniconda.sh && \ | |
| conda clean -ya | |
| RUN add-apt-repository ppa:flexiondotorg/nvtop && \ | |
| apt-get upgrade -y && \ | |
| apt-get install -y --no-install-recommends nvtop | |
| RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - && \ | |
| apt-get install -y nodejs && \ | |
| npm install -g configurable-http-proxy | |
| RUN adduser --disabled-password --gecos '' --shell /bin/bash user && \ | |
| chown -R user:user /app | |
| WORKDIR /home/user/app | |
| RUN --mount=target=/root/packages.txt,source=packages.txt \ | |
| apt-get update && \ | |
| xargs -r -a /root/packages.txt apt-get install -y --no-install-recommends && \ | |
| rm -rf /var/lib/apt/lists/* | |
| # Adding the deadsnakes PPA and installing Python 3.10 | |
| RUN add-apt-repository ppa:deadsnakes/ppa && \ | |
| apt-get update && \ | |
| apt-get install -y python3.10 python3.10-venv python3.10-dev python3.10-distutils | |
| RUN curl -sL https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \ | |
| python3.10 get-pip.py && \ | |
| rm get-pip.py | |
| RUN ln -s /usr/bin/python3.10 /usr/local/bin/python3 | |
| COPY . /home/user/app | |
| RUN pip install -r requirements.txt | |
| CMD ["bash", "/root/on_startup.sh"] |