Agent_paper / Dockerfile
Agentneed's picture
n
4b95d23
raw
history blame contribute delete
755 Bytes
# Use Python 3.12 as recommended
FROM python:3.12-slim
# Install LaTeX (optional but recommended if compile_latex=true)
RUN apt-get update && \
apt-get install -y --no-install-recommends texlive-latex-extra && \
rm -rf /var/lib/apt/lists/*
# Create non-root user
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
WORKDIR /app
# Install Python deps
COPY --chown=user ./requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
# Install uvicorn for FastAPI
RUN pip install --no-cache-dir uvicorn fastapi pydantic
# Copy app code
COPY --chown=user . /app
# Expose default HF port
EXPOSE 7860
# Start FastAPI app
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]