Spaces:
Paused
Paused
File size: 945 Bytes
9aa37ee 7397d2d 9aa37ee 7397d2d 6e1997a 7397d2d 9aa37ee 7397d2d bdaca7e 6e1997a 7397d2d f8e65fb |
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 |
FROM nvidia/cuda:12.8.1-cudnn-runtime-ubuntu22.04
# RUN add-apt-repository ppa:deadsnakes/ppa
RUN apt-get update && \
apt-get install -y --no-install-recommends \
curl \
build-essential \
git \
python3 \
python3-dev && \
rm -rf /var/lib/apt/lists/*
# uv
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
RUN useradd -m -u 1000 user
# Setup environment
WORKDIR /code
ADD ./requirements.txt /code/requirements.txt
RUN uv pip install --no-cache --system -r /code/requirements.txt
# Server configurations
EXPOSE 7860
USER user
# Environment variables
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
# Setup application directory
WORKDIR $HOME/app
ADD --chown=user ./resources $HOME/app/resources
ADD --chown=user ./ingest.py $HOME/app/ingest.py
ADD --chown=user ./app.py $HOME/app/app.py
# Run the application
CMD ["/bin/sh", "-c", "uv run --no-cache ingest.py && exec uv run --no-cache app.py"]
|