prism-backend / Dockerfile
Penguindrum920's picture
Prepare PRISM backend for Hugging Face Spaces
7bc5fde verified
Raw
History Blame Contribute Delete
528 Bytes
FROM python:3.11-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PORT=7860 \
PD_ALLOWED_ORIGINS=* \
PD_LOAD_TRANSFORMERS=0 \
MPLBACKEND=Agg
WORKDIR /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends libgomp1 \
&& rm -rf /var/lib/apt/lists/*
COPY requirements-hf.txt ./requirements-hf.txt
RUN pip install --no-cache-dir --upgrade pip \
&& pip install --no-cache-dir -r requirements-hf.txt
COPY . .
EXPOSE 7860
CMD ["python", "start_server.py", "--skip-init"]