valeriow/parallel-constrained-decoding
0
1FROM python:3.11-slim2 3# Create standard non-root user with UID 1000 for Hugging Face Spaces4RUN useradd -m -u 1000 user5WORKDIR /home/user/app6 7# Install minimal OS dependencies8RUN apt-get update && apt-get install -y --no-install-recommends \9 build-essential \10 git \11 curl \12 && rm -rf /var/lib/apt/lists/*13 14# Switch to non-root user15USER user16ENV HOME=/home/user \17 PATH=/home/user/.local/bin:$PATH \18 PYTHONUNBUFFERED=1 \19 PORT=7860 \20 BACKEND=torch \21 MODEL_ID=Qwen/Qwen2.5-1.5B-Instruct22 23# Install Python requirements24COPY --chown=user requirements-spaces.txt /home/user/app/requirements.txt25RUN pip install --no-cache-dir --upgrade pip && \26 pip install --no-cache-dir -r requirements.txt27 28# Copy source tree29COPY --chown=user . /home/user/app30 31EXPOSE 786032 33CMD ["python3", "-m", "uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "7860"]34 