File size: 895 Bytes
81abf7f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | FROM python:3.10-slim
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
ENV PIP_NO_CACHE_DIR=1
ENV PIP_DISABLE_PIP_VERSION_CHECK=1
RUN apt-get update \
&& apt-get install -y --no-install-recommends git build-essential \
&& rm -rf /var/lib/apt/lists/*
ARG ROBOSTAR_REF=main
RUN git clone https://github.com/zyjOrz/RoboSTAR.git /opt/RoboSTAR \
&& git -C /opt/RoboSTAR checkout ${ROBOSTAR_REF}
RUN pip install -e /opt/RoboSTAR
COPY requirements.txt /tmp/requirements.txt
RUN pip install -r /tmp/requirements.txt
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user
ENV HF_HOME=/home/user/.cache/huggingface
WORKDIR /home/user/app
COPY --chown=user:user app ./app
COPY --chown=user:user client_test.py ./client_test.py
EXPOSE 7860
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1", "--proxy-headers", "--forwarded-allow-ips", "*"]
|