sgonzalezu's picture
Deploy LLaVA invoice extraction service
2c911a0
FROM nvidia/cuda:12.1.0-runtime-ubuntu22.04
# Set working directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
python3.10 \
python3-pip \
git \
&& rm -rf /var/lib/apt/lists/*
# Upgrade pip
RUN pip3 install --no-cache-dir --upgrade pip
# Copy requirements first for better caching
COPY requirements.txt .
# Install Python dependencies
RUN pip3 install --no-cache-dir -r requirements.txt
# Copy application files
COPY app.py .
COPY prompts.py .
# Set environment variables
ENV PYTHONUNBUFFERED=1
ENV PORT=7860
# Expose port
EXPOSE 7860
# Run the application
CMD ["python3", "app.py"]