File size: 1,092 Bytes
c3156f6
 
 
 
 
 
 
 
 
 
 
 
 
515204e
c3156f6
 
 
 
 
7c474ca
c3156f6
 
 
 
 
 
 
 
 
 
 
 
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
FROM nvidia/cuda:12.6.3-cudnn-runtime-ubuntu22.04

ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONUNBUFFERED=1
ENV UV_NO_DEV=1
ENV UV_NO_CACHE=1
env GRADIO_ANALYTICS_ENABLED="False"

COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/

RUN apt-get update && apt-get install -y \
    git \
    git-lfs \
    ffmpeg \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/* \
    && git lfs install

RUN --mount=type=secret,id=GH_TOKEN,mode=0444,required=true \
    git clone --single-branch --depth 1 https://$(cat /run/secrets/GH_TOKEN)@github.com/earthspecies/esp-research.git /app/esp-research && \
    git clone --single-branch --depth 1 https://$(cat /run/secrets/GH_TOKEN)@github.com/earthspecies/esp-data.git /app/esp-data

# esp-research installs esp-data from gcloud artifact registry, which is not
# what we want. Instead we modify esp-research to install esp-data directly from
# the clone and then do a sync
WORKDIR /app/esp-research
RUN uv add /app/esp-data
RUN uv sync --frozen

WORKDIR /app/esp-research/projects/NatureLM-audio-hf-app
EXPOSE 7860
CMD ["uv", "run", "app.py"]