Spaces:
Build error
Build error
CUDA + cudnn + PyTorch 2.5.1
Browse files- Dockerfile +25 -20
Dockerfile
CHANGED
|
@@ -1,29 +1,34 @@
|
|
| 1 |
-
#
|
| 2 |
-
|
| 3 |
|
| 4 |
-
|
| 5 |
-
RUN apt-get update && apt-get install -y
|
|
|
|
|
|
|
| 6 |
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
ENV PATH
|
| 10 |
-
|
| 11 |
-
WORKDIR /app
|
| 12 |
|
| 13 |
-
|
| 14 |
-
RUN pip install -
|
| 15 |
|
| 16 |
-
#
|
| 17 |
-
|
|
|
|
| 18 |
|
| 19 |
-
#
|
| 20 |
-
|
| 21 |
|
| 22 |
-
#
|
| 23 |
-
RUN git clone https://github.com/starvector/vllm.git /app/vllm
|
|
|
|
| 24 |
|
| 25 |
-
#
|
| 26 |
-
RUN
|
|
|
|
| 27 |
|
|
|
|
| 28 |
RUN chmod +x ./start.sh
|
| 29 |
-
CMD ["./start.sh"]
|
|
|
|
| 1 |
+
# CUDA + cudnn + PyTorch 2.5.1 (CUDA 12.4)
|
| 2 |
+
FROM pytorch/pytorch:2.5.1-cuda12.4-cudnn9-devel
|
| 3 |
|
| 4 |
+
# Sistema y build tools
|
| 5 |
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 6 |
+
git openssh-client sshpass build-essential cmake ninja-build kmod curl ca-certificates && \
|
| 7 |
+
rm -rf /var/lib/apt/lists/*
|
| 8 |
|
| 9 |
+
# CUDA env
|
| 10 |
+
ENV CUDA_HOME=/usr/local/cuda
|
| 11 |
+
ENV PATH=$CUDA_HOME/bin:$PATH
|
| 12 |
+
ENV LD_LIBRARY_PATH=/usr/local/cuda/lib64:${LD_LIBRARY_PATH}
|
|
|
|
| 13 |
|
| 14 |
+
# Evitar reinstall de torch/torchvision ya presentes y asegurar numpy
|
| 15 |
+
RUN pip install --no-cache-dir -U pip && pip install --no-cache-dir numpy
|
| 16 |
|
| 17 |
+
# C贸digo app
|
| 18 |
+
WORKDIR /app
|
| 19 |
+
COPY . /app
|
| 20 |
|
| 21 |
+
# Instalar el proyecto (usa pyproject del repo)
|
| 22 |
+
RUN pip install --no-cache-dir -e .
|
| 23 |
|
| 24 |
+
# Sustituir vLLM oficial por el fork de StarVector
|
| 25 |
+
RUN git clone https://github.com/starvector/vllm.git /app/vllm && \
|
| 26 |
+
pip install --no-cache-dir -e /app/vllm
|
| 27 |
|
| 28 |
+
# Crear usuario no root despu茅s de instalar dependencias
|
| 29 |
+
RUN useradd -m -u 1000 user && chown -R user:user /app
|
| 30 |
+
USER user
|
| 31 |
|
| 32 |
+
# Permisos y arranque
|
| 33 |
RUN chmod +x ./start.sh
|
| 34 |
+
CMD ["./start.sh"]
|