File size: 1,126 Bytes
ba76748 382cb9b ba76748 4bfd06b 98913fb 423ede5 ba76748 34eec45 b5c18b6 ba76748 b5c18b6 56a60b8 6bda5c1 |
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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
FROM python:3.12-slim
WORKDIR /app
COPY --link --chown=1000 . .
RUN mkdir -p /tmp/cache/
RUN chmod a+rwx -R /tmp/cache/
RUN apt-get update && apt-get install -y poppler-utils ca-certificates curl gnupg build-essential \
gcc \
g++ \
make \
libffi-dev \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*
ENV PYTHONPATH=/app
ENV HF_HOME=/tmp/cache/
RUN mkdir db
# RUN pip install --no-cache-dir -r requirements.txt
# Download the latest installer
ADD https://astral.sh/uv/install.sh /uv-installer.sh
# Run the installer then remove it
RUN sh /uv-installer.sh && rm /uv-installer.sh
# Ensure the installed binary is on the `PATH`
ENV PATH="/root/.local/bin/:$PATH"
ENV UV_LINK_MODE=copy
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync
RUN uv run huggingface-cli download Shamik/arxiv_cs_2020_07_2025 --repo-type dataset --local-dir app/db
RUN ls app/db
ENV PYTHONUNBUFFERED=1 GRADIO_ALLOW_FLAGGING=never GRADIO_NUM_PORTS=1 GRADIO_SERVER_NAME=0.0.0.0 GRADIO_SERVER_PORT=7860 SYSTEM=spaces
# RUN --mount=type=secret,id=HF_TOKEN,mode=0444,required=true
ENV PATH="/app/.venv/bin:$PATH"
RUN uv run app.py |