FROM ubuntu:22.04 ENV DEBIAN_FRONTEND=noninteractive \ HF_HOME=/app/.cache/huggingface \ TRANSFORMERS_CACHE=/app/.cache/huggingface RUN apt-get update && apt-get install -y --no-install-recommends \ python3.10 \ python3.10-dev \ python3-pip \ git \ curl \ build-essential \ cmake \ ninja-build \ libcurl4-openssl-dev \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1 WORKDIR /app RUN mkdir -p /app/.cache/huggingface && chmod -R 777 /app/.cache COPY requirements.txt ./ RUN pip3 install --no-cache-dir -r requirements.txt COPY . . EXPOSE 7860 CMD ["python3", "app.py"]