FROM python:3.10.16-slim-bookworm ENV PYTHONUNBUFFERED=1 PIP_NO_CACHE_DIR=1 TOKENIZERS_PARALLELISM=false \ HF_HOME=/home/user/.cache/huggingface \ NEXTGPT_WEIGHTS=/home/user/app/weights NEXTGPT_OUTPUTS=/home/user/app/outputs RUN apt-get update && apt-get install -y --no-install-recommends \ ffmpeg libgl1 libglib2.0-0 libsndfile1 build-essential git \ && rm -rf /var/lib/apt/lists/* RUN useradd -m -u 1000 user WORKDIR /home/user/app COPY requirements.txt ./ RUN pip install --upgrade pip==24.3.1 setuptools==69.5.1 wheel==0.44.0 \ && pip install torch==1.13.1+cu117 torchvision==0.14.1+cu117 torchaudio==0.13.1+cu117 \ --extra-index-url https://download.pytorch.org/whl/cu117 \ && pip install -r requirements.txt \ && pip check COPY --chown=user:user . . USER user RUN python scripts/smoke_check.py && python -m unittest discover -s tests -v EXPOSE 7860 CMD ["python", "scripts/start.py"]