Spaces:
Paused
Paused
FROM nvcr.io/nvidia/pytorch:24.03-py3 | |
LABEL authors="[email protected]" | |
ARG DEBIAN_FRONTEND=noninteractive | |
ARG WORKDIR="/var/task" | |
ENV PYTHONUNBUFFERED=1 | |
ENV PYTHONPATH=${WORKDIR}:${WORKDIR}/venv:${PYTHONPATH} | |
ENV PATH=${WORKDIR}/venv/bin:$PATH | |
ENV XDG_CACHE_HOME=/data | |
WORKDIR ${WORKDIR} | |
COPY . ${WORKDIR}/ | |
RUN ls ${WORKDIR}/ | |
RUN mkdir -p ${XDG_CACHE_HOME}/.cache | |
RUN chmod 770 ${XDG_CACHE_HOME}/.cache | |
RUN apt update && apt upgrade -y && apt install --no-install-recommends -y \ | |
build-essential \ | |
python3.11 \ | |
python3-pip \ | |
python3-dev \ | |
python3-venv \ | |
git \ | |
ffmpeg \ | |
curl \ | |
&& apt clean && rm -rf /var/lib/apt/lists/* | |
RUN which python3 | |
RUN python3 --version | |
RUN python3 -m venv venv | |
RUN source ${WORKDIR}/venv/bin/activate python -m pip install pip --upgrade && python -m pip install -r ${WORKDIR}/requirements.txt | |
RUN source ${WORKDIR}/venv/bin/activate && which python && python --version | |
RUN chmod +x ${WORKDIR}/scripts/entrypoint.sh | |
RUN curl -o /tmp/frpc_linux_amd64_v0.2 https://cdn-media.huggingface.co/frpc-gradio-0.2/frpc_linux_amd64 | |
RUN ls -l /tmp/frpc_linux_amd64_v0.2 | |
RUN cp /tmp/frpc_linux_amd64_v0.2 ${WORKDIR}/venv/lib/python*/site-packages/gradio | |
RUN ls -l ${WORKDIR}/venv/lib/python*/site-packages/gradio | |
RUN ls -l ${WORKDIR}/venv/bin | |
RUN bash --version | |
RUN chmod 770 ${WORKDIR}/flagged/ | |
RUN chmod 770 ${WORKDIR}/flagged/* || true | |
RUN ls -ld ${WORKDIR}/flagged/ | |
RUN ls -ld ${WORKDIR}/flagged/* || echo "folders ${WORKDIR}/flagged/* not found" | |
RUN ls -l ${WORKDIR} | |
RUN ls -l ${WORKDIR}/scripts/ | |
RUN ls -l ${WORKDIR}/scripts/entrypoint.sh | |
EXPOSE 7860 | |
CMD ["/var/task/scripts/entrypoint.sh"] | |
# CMD [ | |
# "/var/task/scripts/entrypoint.sh", | |
# "/var/task/venv/bin/uvicorn", "app:lisa_app", | |
# "--host", "0.0.0.0", | |
# "--port", "7860", | |
# "--version='xinlai/LISA-13B-llama2-v1-explanatory'", | |
# "--precision='fp16'", | |
# "--load_in_4bit" | |
# ] | |