Spaces:
Build error
Build error
File size: 1,346 Bytes
454606b 3ca1ca3 454606b 3ca1ca3 454606b 3ca1ca3 454606b 6f19bfc 454606b c7981d2 15b2a16 454606b c7981d2 454606b 44a4827 454606b 748f12d 454606b 435ce6e 454606b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# CUDA + cudnn + PyTorch 2.5.1 (CUDA 12.4)
FROM pytorch/pytorch:2.5.1-cuda12.4-cudnn9-devel
# Sistema y build tools
RUN apt-get update && apt-get install -y --no-install-recommends \
git openssh-client sshpass build-essential cmake ninja-build kmod curl ca-certificates && \
rm -rf /var/lib/apt/lists/*
# CUDA env
ENV CUDA_HOME=/usr/local/cuda
ENV PATH=$CUDA_HOME/bin:$PATH
ENV LD_LIBRARY_PATH=/usr/local/cuda/lib64:${LD_LIBRARY_PATH}
# Evitar reinstall de torch/torchvision ya presentes y asegurar numpy
RUN pip install --no-cache-dir -U pip && pip install --no-cache-dir numpy
# Código app
WORKDIR /app
COPY . /app
# Sistema y build tools (añade paquetes de Cairo)
RUN apt-get update && apt-get install -y --no-install-recommends \
git openssh-client sshpass build-essential cmake ninja-build kmod \
pkg-config libcairo2-dev python3-dev libffi-dev \
&& rm -rf /var/lib/apt/lists/*
# Instalar el proyecto (usa pyproject del repo)
RUN pip install --no-cache-dir -e .
# Sustituir vLLM oficial por el fork de StarVector
RUN git clone https://github.com/starvector/vllm.git /app/vllm && \
pip install --no-cache-dir -e /app/vllm
# Crear usuario no root después de instalar dependencias
RUN useradd -m -u 1000 user && chown -R user:user /app
USER user
# Permisos y arranque
RUN chmod +x ./start.sh
CMD ["./start.sh"]
|