Spaces:
Runtime error
Runtime error
File size: 2,624 Bytes
102f4d2 f066cd2 89e9008 102f4d2 74bc656 102f4d2 f066cd2 102f4d2 e72b932 102f4d2 936060a 102f4d2 f066cd2 102f4d2 | 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 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | # ElevenClip AI — HuggingFace Spaces (AMD ROCm)
FROM rocm/pytorch:rocm6.3_ubuntu22.04_py3.10_pytorch_release_2.3.0
WORKDIR /app
ENV PYTHONPATH="/app/backend:/app"
# System dependencies
RUN apt-get update && apt-get install -y \
ffmpeg \
nginx \
curl \
git \
ca-certificates \
gnupg \
&& rm -rf /var/lib/apt/lists/*
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
&& apt-get install -y nodejs \
&& rm -rf /var/lib/apt/lists/*
# ─── Backend Python dependencies ───────────────────────────────────────────
COPY backend/requirements.txt /app/backend/requirements.txt
RUN pip install --no-cache-dir -r /app/backend/requirements.txt
# vLLM with ROCm support
RUN pip install --no-cache-dir \
"vllm>=0.6.0" \
--extra-index-url https://download.pytorch.org/whl/rocm6.2
COPY backend/ /app/backend/
# ─── Frontend (Next.js standalone build) ──────────────────────────────────
COPY frontend/package*.json /app/frontend/
RUN cd /app/frontend && npm ci --production=false
COPY frontend/ /app/frontend/
# Relative API URL — nginx proxies /api/* and /ws/* to FastAPI :8080
ENV NEXT_PUBLIC_API_URL=""
ENV NEXT_PUBLIC_DEMO_ENABLED="true"
ENV NEXT_PUBLIC_DEMO_ONLY="true"
ENV REMOTE_BACKEND_URL="http://129.212.178.101:8080"
RUN cd /app/frontend \
&& npm run build \
&& mkdir -p .next/standalone/.next \
&& cp -r .next/static .next/standalone/.next/static \
&& cp -r public .next/standalone/public
# ─── nginx config ──────────────────────────────────────────────────────────
COPY nginx.conf /app/nginx.conf
# ─── Runtime directories ───────────────────────────────────────────────────
RUN mkdir -p /tmp/elevnclip /root/.cache/huggingface /root/ElevenClip-AI/demo_videos
# ─── Startup ──────────────────────────────────────────────────────────────
COPY start.sh /app/start.sh
RUN chmod +x /app/start.sh
EXPOSE 7860
# vLLM managed on-demand by vllm_manager.py (not started at container startup)
ENV VLLM_ON_DEMAND="true"
ENV VLLM_PORT="8000"
ENV VLLM_IDLE_TIMEOUT="300"
ENV VLLM_DOCKER_CONTAINER=""
CMD ["/app/start.sh"]
|