File size: 1,492 Bytes
57ac9fb
 
 
caf42f6
 
 
 
 
57ac9fb
 
 
caf42f6
926b2a6
ad92aa1
 
 
 
 
 
 
caf42f6
 
 
 
 
 
982628c
 
 
6c30873
982628c
 
 
57ac9fb
118eb12
57ac9fb
283e8ae
118eb12
57ac9fb
 
 
 
b19cc5f
 
57ac9fb
 
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
FROM python:3.11-slim

ENV PYTHONUNBUFFERED=1 \
    PIP_NO_CACHE_DIR=1 \
    DENO_NO_UPDATE_CHECK=1 \
    DEBIAN_FRONTEND=noninteractive

ARG DENO_VERSION=2.0.0

WORKDIR /app

RUN apt-get update && \
    apt-get install -y --no-install-recommends curl unzip ca-certificates ffmpeg git && \
    arch="$(uname -m)" && \
    case "$arch" in \
        x86_64) deno_arch="x86_64-unknown-linux-gnu" ;; \
        aarch64|arm64) deno_arch="aarch64-unknown-linux-gnu" ;; \
        *) echo "Unsupported architecture for Deno: $arch" >&2; exit 1 ;; \
    esac && \
    curl -fsSL "https://github.com/denoland/deno/releases/download/v${DENO_VERSION}/deno-${deno_arch}.zip" -o /tmp/deno.zip && \
    unzip -q /tmp/deno.zip -d /tmp && \
    mv /tmp/deno /usr/local/bin/deno && \
    chmod +x /usr/local/bin/deno && \
    rm -rf /tmp/deno.zip && \
    rm -rf /var/lib/apt/lists/*

# populate cache; this works around HuggingFace egress restrictions
RUN curl -fsSL "https://ndurner.de/download/aileen3/aileen3-cache.zip" -o /tmp/aileen3-cache.zip && \
    unzip -q /tmp/aileen3-cache.zip -d /tmp && \
    mkdir -p /root/.cache && \
    mv /tmp/aileen3-cache /root/.cache/aileen3 && \
    rm -rf /tmp/aileen3-cache.zip

COPY demo/requirements.txt demo/requirements.txt
COPY mcp mcp
RUN pip install --upgrade pip && \
    pip install -r demo/requirements.txt && \
    pip install -e ./mcp

COPY demo demo

EXPOSE 7860
ENV GRADIO_SERVER_PORT=7860 \
    GRADIO_SERVER_NAME=0.0.0.0

CMD ["python", "demo/app.py"]