| FROM nvidia/cuda:12.1.0-devel-ubuntu22.04 AS dev |
|
|
| RUN apt-get update -y \ |
| && apt-get install -y python3-pip git |
|
|
| |
| |
| |
| |
| RUN ldconfig /usr/local/cuda-12.1/compat/ |
|
|
| WORKDIR /code |
|
|
| COPY ./requirements.txt /code/requirements.txt |
|
|
| |
| RUN useradd -m -u 1000 user |
| |
| USER user |
| |
| ENV HOME=/home/user \ |
| PATH=/home/user/.local/bin:$PATH \ |
| PYTHONPATH=$HOME/app \ |
| PYTHONUNBUFFERED=1 \ |
| GRADIO_ALLOW_FLAGGING=never \ |
| GRADIO_NUM_PORTS=1 \ |
| GRADIO_SERVER_NAME=0.0.0.0 \ |
| GRADIO_THEME=huggingface \ |
| SYSTEM=spaces |
|
|
| RUN pip3 install -U pip |
| RUN pip3 install -U Cython ninja |
| RUN pip3 install --no-cache-dir --upgrade -r /code/requirements.txt |
|
|
| |
| WORKDIR $HOME/app |
| RUN git clone https://github.com/PhungVanDuy/vllm && cd vllm && pip install . && cd .. |
|
|
| |
| COPY --chown=user . $HOME/app |
|
|
| CMD ["python3", "app.py"] |