FROM python:3.12-slim ENV PYTHONDONTWRITEBYTECODE=1 \ PYTHONUNBUFFERED=1 \ PIP_NO_CACHE_DIR=1 \ HOME=/home/user \ HARNESS_ENABLE_REAL=0 RUN useradd --create-home --uid 1000 user WORKDIR /app COPY requirements.txt /tmp/requirements.txt RUN pip install --no-cache-dir -r /tmp/requirements.txt COPY harnesslab_bundle.zip /tmp/harnesslab_bundle.zip RUN python -m zipfile -e /tmp/harnesslab_bundle.zip /app \ && chown -R user:user /app USER user EXPOSE 7860 CMD ["python", "-m", "uvicorn", "space_app:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"]