hermes-serverless / Dockerfile
saadpie's picture
Update Dockerfile
df5016e verified
Raw
History Blame Contribute Delete
683 Bytes
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
ENV HOME=/root
RUN apt-get update && apt-get install -y --no-install-recommends wget curl git python3 python3-pip python3-venv tini xz-utils && rm -rf /var/lib/apt/lists/*
RUN pip3 install --no-cache-dir fastapi uvicorn pydantic httpx
RUN mkdir -p /data/sessions /app && chmod 777 /data
WORKDIR /app
ENV SESSIONS_DIR="/data/sessions"
COPY server.py /app/server.py
COPY entrypoint.sh /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh
EXPOSE 7860
HEALTHCHECK --interval=15s --timeout=5s --start-period=30s --retries=3 CMD curl -sf http://localhost:7860/health || exit 1
ENTRYPOINT ["/usr/bin/tini", "--"]
CMD ["/app/entrypoint.sh"]