pixtral-demo / Dockerfile
alexandraroze's picture
updated poetry
050f059
raw
history blame
1.15 kB
# Use NVIDIA CUDA base image
FROM nvidia/cuda:12.3.2-cudnn9-devel-ubuntu22.04
# Install system dependencies for Python and Poetry
RUN apt-get update && apt-get install -y \
python3 python3-pip python3-venv build-essential curl git \
&& rm -rf /var/lib/apt/lists/*
# Install Poetry globally
RUN pip install --no-cache-dir --upgrade pip \
&& pip install --no-cache-dir poetry
# Set environment variables for Poetry and Python
ENV POETRY_VIRTUALENVS_CREATE=false \
POETRY_CACHE_DIR=/root/.cache/pypoetry \
PATH="/root/.local/bin:$PATH"
# Set the working directory
WORKDIR /app
# Copy Poetry configuration files
COPY pyproject.toml ./
# Install Python dependencies with Poetry
RUN poetry install --no-interaction --no-ansi \
&& pip install --no-build-isolation flash-attn \
&& pip install "rerankers[all]"
# Copy the rest of the application
COPY . .
# Expose a port if needed (update according to your application)
EXPOSE 8501
# Run the Streamlit app
CMD ["streamlit", "run", "app.py", "--server.headless=true", "--server.enableCORS=false", "--server.enableXsrfProtection=false", "--server.fileWatcherType=none"]