Skip to content

Commit 9ddac59

Browse files
Update compose/local/django/Dockerfile
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 747c73e commit 9ddac59

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

compose/local/django/Dockerfile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,10 @@ RUN apt-get install -y ninja-build cmake
3232

3333
# Configurar variables de entorno para compilar con BLAS y SIMD condicionalmente
3434
ARG ENABLE_OPTIMIZATIONS=true
35-
RUN if [ "${ENABLE_OPTIMIZATIONS}" = "true" ]; then \
36-
export CFLAGS="-mfma -mavx2"; \
37-
export CXXFLAGS="-mfma -mavx2"; \
38-
export CMAKE_ARGS="-DGML_BLAS=ON -DGGML_BLAS_VENDOR=OpenBLAS"; \
39-
fi
35+
ARG ENABLE_OPTIMIZATIONS=true
36+
ENV CFLAGS="${ENABLE_OPTIMIZATIONS:+-mfma -mavx2}" \
37+
CXXFLAGS="${ENABLE_OPTIMIZATIONS:+-mfma -mavx2}" \
38+
CMAKE_ARGS="${ENABLE_OPTIMIZATIONS:+-DGML_BLAS=ON -DGGML_BLAS_VENDOR=OpenBLAS}"
4039

4140
# Actualizar pip, setuptools y wheel antes de instalar dependencias
4241
RUN python -m pip install --upgrade pip setuptools wheel

0 commit comments

Comments
 (0)