AITestingWorkSpace/DocumentAnalysis
0
1FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.042 3# Set environment variables4ENV PYTHONDONTWRITEBYTECODE=15ENV PYTHONUNBUFFERED=16ENV DEBIAN_FRONTEND=noninteractive7 8# Hugging Face cache locations (feel free to rename as needed)9ENV TRANSFORMERS_CACHE=/app/.cache10ENV HF_HOME=/app/.cache11ENV HF_HUB_CACHE=/app/.cache12 13# Install system dependencies14RUN apt-get update && apt-get install -y --no-install-recommends \15 python3 \16 python3-pip \17 python3-dev \18 build-essential \19 git \20 && apt-get clean \21 && rm -rf /var/lib/apt/lists/*22 23# Create the cache directory and fix permissions24RUN mkdir -p /app/.cache && chmod -R 777 /app/.cache25 26# Set the working directory27WORKDIR /app28 29# Copy requirements file30COPY requirements.txt .31 32# Install Python dependencies33RUN pip3 install --no-cache-dir -U pip setuptools wheel34RUN pip3 install --no-cache-dir -r requirements.txt35 36# Copy application code37COPY app.py .38 39# Set the default command to run the application40CMD ["python3", "app.py"]41 