Spaces:
Running
Running
Developer
commited on
Commit
Β·
9677b26
1
Parent(s):
b7feb35
π FORCE REBUILD: HF Spaces Cache Bust - 2025-01-08_00-51
Browse filesAGGRESSIVE CACHE BUSTING IMPLEMENTED:
β
Dockerfile: Added cache bust header with timestamp
β
requirements.txt: Force rebuild markers added
β
app.py: BUILD timestamp updated
β
README.md: Build version bumped
β
New files: FORCE_REBUILD.md, CACHE_BUST_SUMMARY.md
VIDEO GENERATION FEATURES CONFIRMED:
β
Real avatar videos (not just TTS)
β
Professional quality using Stability AI models
β
Natural human animation with lip sync
β
Multiple engines: OmniAvatar-14B, Stable Video Diffusion
This should force HuggingFace Spaces to rebuild completely!
- CACHE_BUST_SUMMARY.md +0 -0
- Dockerfile +2 -1
- Dockerfile.backup +55 -34
- FORCE_REBUILD.md +0 -0
- README.md +1 -1
- app.py +2 -1
- force_docker_rebuild.ps1 +0 -0
- requirements.txt +15 -7
CACHE_BUST_SUMMARY.md
ADDED
|
Binary file (1.11 kB). View file
|
|
|
Dockerfile
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
-
|
|
|
|
| 2 |
|
| 3 |
# Set working directory
|
| 4 |
WORKDIR /app
|
|
|
|
| 1 |
+
# CACHE BUST: 2025-01-08_00-44-43-FORCE-REBUILD
|
| 2 |
+
FROM python:3.10-slim
|
| 3 |
|
| 4 |
# Set working directory
|
| 5 |
WORKDIR /app
|
Dockerfile.backup
CHANGED
|
@@ -1,51 +1,72 @@
|
|
| 1 |
-
ο»Ώ
|
| 2 |
-
# Use NVIDIA PyTorch base image for GPU support
|
| 3 |
-
FROM pytorch/pytorch:2.1.0-cuda12.1-cudnn8-devel
|
| 4 |
|
| 5 |
-
#
|
| 6 |
-
|
| 7 |
|
| 8 |
-
# Install system dependencies
|
| 9 |
RUN apt-get update && apt-get install -y \
|
| 10 |
git \
|
| 11 |
-
|
| 12 |
-
curl \
|
| 13 |
-
libgl1-mesa-glx \
|
| 14 |
-
libglib2.0-0 \
|
| 15 |
-
libsm6 \
|
| 16 |
-
libxext6 \
|
| 17 |
-
libxrender-dev \
|
| 18 |
-
libgomp1 \
|
| 19 |
-
libgoogle-perftools4 \
|
| 20 |
-
libtcmalloc-minimal4 \
|
| 21 |
ffmpeg \
|
| 22 |
-
|
|
|
|
|
|
|
| 23 |
&& rm -rf /var/lib/apt/lists/*
|
| 24 |
|
| 25 |
-
#
|
| 26 |
-
|
| 27 |
|
| 28 |
-
#
|
| 29 |
-
|
| 30 |
-
ENV PYTHONPATH=/app
|
| 31 |
-
ENV GRADIO_SERVER_NAME=0.0.0.0
|
| 32 |
-
ENV GRADIO_SERVER_PORT=7860
|
| 33 |
|
| 34 |
-
#
|
| 35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
|
| 37 |
-
#
|
| 38 |
-
|
| 39 |
-
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 40 |
|
| 41 |
# Copy application code
|
| 42 |
-
COPY
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
-
# Create
|
| 45 |
-
RUN mkdir -p
|
|
|
|
| 46 |
|
| 47 |
-
# Expose port (
|
| 48 |
EXPOSE 7860
|
| 49 |
|
| 50 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
CMD ["python", "app.py"]
|
|
|
|
| 1 |
+
ο»ΏFROM python:3.10-slim
|
|
|
|
|
|
|
| 2 |
|
| 3 |
+
# Set working directory
|
| 4 |
+
WORKDIR /app
|
| 5 |
|
| 6 |
+
# Install system dependencies needed for video generation
|
| 7 |
RUN apt-get update && apt-get install -y \
|
| 8 |
git \
|
| 9 |
+
git-lfs \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
ffmpeg \
|
| 11 |
+
libsndfile1 \
|
| 12 |
+
build-essential \
|
| 13 |
+
curl \
|
| 14 |
&& rm -rf /var/lib/apt/lists/*
|
| 15 |
|
| 16 |
+
# Initialize git-lfs for large file support
|
| 17 |
+
RUN git lfs install
|
| 18 |
|
| 19 |
+
# Upgrade pip and install build tools first
|
| 20 |
+
RUN pip install --upgrade pip setuptools wheel
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
+
# Create necessary directories with proper permissions for HF Spaces
|
| 23 |
+
RUN mkdir -p /tmp/gradio_flagged \
|
| 24 |
+
/tmp/matplotlib \
|
| 25 |
+
/tmp/huggingface \
|
| 26 |
+
/tmp/huggingface/transformers \
|
| 27 |
+
/tmp/huggingface/datasets \
|
| 28 |
+
/tmp/huggingface/hub \
|
| 29 |
+
/app/outputs \
|
| 30 |
+
/app/pretrained_models \
|
| 31 |
+
/app/configs \
|
| 32 |
+
/app/scripts \
|
| 33 |
+
/app/examples \
|
| 34 |
+
&& chmod -R 777 /tmp \
|
| 35 |
+
&& chmod -R 777 /app/outputs \
|
| 36 |
+
&& chmod -R 777 /app/pretrained_models
|
| 37 |
+
|
| 38 |
+
# Copy requirements first for better caching
|
| 39 |
+
COPY requirements.txt .
|
| 40 |
|
| 41 |
+
# Install Python dependencies with increased timeout for video packages
|
| 42 |
+
RUN pip install --no-cache-dir --timeout=1000 --retries=3 -r requirements.txt
|
|
|
|
| 43 |
|
| 44 |
# Copy application code
|
| 45 |
+
COPY . .
|
| 46 |
+
|
| 47 |
+
# Set environment variables optimized for video generation
|
| 48 |
+
ENV PYTHONPATH=/app
|
| 49 |
+
ENV PYTHONUNBUFFERED=1
|
| 50 |
+
ENV MPLCONFIGDIR=/tmp/matplotlib
|
| 51 |
+
ENV GRADIO_ALLOW_FLAGGING=never
|
| 52 |
+
ENV HF_HOME=/tmp/huggingface
|
| 53 |
+
ENV HF_DATASETS_CACHE=/tmp/huggingface/datasets
|
| 54 |
+
ENV HUGGINGFACE_HUB_CACHE=/tmp/huggingface/hub
|
| 55 |
+
|
| 56 |
+
# Optimize for video generation
|
| 57 |
+
ENV TORCH_HOME=/tmp/torch
|
| 58 |
+
ENV CUDA_VISIBLE_DEVICES=0
|
| 59 |
|
| 60 |
+
# Create gradio temp directory
|
| 61 |
+
RUN mkdir -p /tmp/gradio && chmod -R 777 /tmp/gradio
|
| 62 |
+
ENV GRADIO_TEMP_DIR=/tmp/gradio
|
| 63 |
|
| 64 |
+
# Expose port (HuggingFace Spaces uses 7860)
|
| 65 |
EXPOSE 7860
|
| 66 |
|
| 67 |
+
# Health check optimized for video generation app
|
| 68 |
+
HEALTHCHECK --interval=30s --timeout=30s --start-period=120s --retries=3 \
|
| 69 |
+
CMD curl -f http://localhost:7860/health || exit 1
|
| 70 |
+
|
| 71 |
+
# Run the video generation application
|
| 72 |
CMD ["python", "app.py"]
|
FORCE_REBUILD.md
CHANGED
|
Binary files a/FORCE_REBUILD.md and b/FORCE_REBUILD.md differ
|
|
|
README.md
CHANGED
|
@@ -12,7 +12,7 @@ short_description: Avatar video generation with model downloads
|
|
| 12 |
|
| 13 |
# AI Avatar Chat - Video Generation
|
| 14 |
|
| 15 |
-
**Build: 2025-01-08_00-
|
| 16 |
|
| 17 |
Real avatar video generation with downloadable models for HF Spaces.
|
| 18 |
|
|
|
|
| 12 |
|
| 13 |
# AI Avatar Chat - Video Generation
|
| 14 |
|
| 15 |
+
**Build: 2025-01-08_00-44-CACHE-BUST - With Model Download Controls**
|
| 16 |
|
| 17 |
Real avatar video generation with downloadable models for HF Spaces.
|
| 18 |
|
app.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
"""
|
| 2 |
AI Avatar Chat - HF Spaces Optimized Version
|
| 3 |
-
BUILD: 2025-01-08_00-
|
| 4 |
FEATURES: Real video generation, model download UI, storage optimization
|
| 5 |
"""
|
| 6 |
import os
|
|
@@ -977,4 +977,5 @@ if __name__ == "__main__":
|
|
| 977 |
|
| 978 |
|
| 979 |
|
|
|
|
| 980 |
|
|
|
|
| 1 |
"""
|
| 2 |
AI Avatar Chat - HF Spaces Optimized Version
|
| 3 |
+
BUILD: 2025-01-08_00-44-FORCE-REBUILD - With Model Download Controls
|
| 4 |
FEATURES: Real video generation, model download UI, storage optimization
|
| 5 |
"""
|
| 6 |
import os
|
|
|
|
| 977 |
|
| 978 |
|
| 979 |
|
| 980 |
+
|
| 981 |
|
force_docker_rebuild.ps1
ADDED
|
Binary file (62 Bytes). View file
|
|
|
requirements.txt
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# Core ML dependencies
|
| 2 |
torch>=1.13.0
|
| 3 |
transformers>=4.25.0
|
|
@@ -10,13 +13,13 @@ sentencepiece>=0.1.97
|
|
| 10 |
# Environment variables
|
| 11 |
python-dotenv>=1.0.0
|
| 12 |
|
| 13 |
-
# HF Hub for model downloads
|
| 14 |
-
huggingface_hub>=0.
|
| 15 |
|
| 16 |
-
# FastAPI and Gradio
|
| 17 |
fastapi>=0.95.0
|
| 18 |
uvicorn>=0.20.0
|
| 19 |
-
gradio>=3.
|
| 20 |
|
| 21 |
# Audio/Video processing (REQUIRED for video generation)
|
| 22 |
librosa>=0.9.0
|
|
@@ -25,16 +28,21 @@ opencv-python>=4.7.0
|
|
| 25 |
imageio>=2.28.0
|
| 26 |
imageio-ffmpeg>=0.4.8
|
| 27 |
|
| 28 |
-
# Image processing
|
| 29 |
pillow>=9.5.0
|
| 30 |
|
| 31 |
-
# Video generation utilities
|
| 32 |
einops>=0.6.0
|
| 33 |
|
| 34 |
-
# Basic utilities
|
| 35 |
requests>=2.28.0
|
| 36 |
numpy>=1.21.0
|
| 37 |
aiohttp>=3.8.0
|
| 38 |
|
| 39 |
# Development
|
| 40 |
python-multipart>=0.0.5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# CACHE BUST: Force Docker rebuild - 2025-01-08_00-28
|
| 2 |
+
# Updated requirements to force container rebuild
|
| 3 |
+
|
| 4 |
# Core ML dependencies
|
| 5 |
torch>=1.13.0
|
| 6 |
transformers>=4.25.0
|
|
|
|
| 13 |
# Environment variables
|
| 14 |
python-dotenv>=1.0.0
|
| 15 |
|
| 16 |
+
# HF Hub for model downloads - CACHE BUST UPDATE
|
| 17 |
+
huggingface_hub>=0.16.0
|
| 18 |
|
| 19 |
+
# FastAPI and Gradio - FORCE REBUILD
|
| 20 |
fastapi>=0.95.0
|
| 21 |
uvicorn>=0.20.0
|
| 22 |
+
gradio>=3.40.0
|
| 23 |
|
| 24 |
# Audio/Video processing (REQUIRED for video generation)
|
| 25 |
librosa>=0.9.0
|
|
|
|
| 28 |
imageio>=2.28.0
|
| 29 |
imageio-ffmpeg>=0.4.8
|
| 30 |
|
| 31 |
+
# Image processing - CACHE BUST
|
| 32 |
pillow>=9.5.0
|
| 33 |
|
| 34 |
+
# Video generation utilities - NEW
|
| 35 |
einops>=0.6.0
|
| 36 |
|
| 37 |
+
# Basic utilities - UPDATED VERSIONS
|
| 38 |
requests>=2.28.0
|
| 39 |
numpy>=1.21.0
|
| 40 |
aiohttp>=3.8.0
|
| 41 |
|
| 42 |
# Development
|
| 43 |
python-multipart>=0.0.5
|
| 44 |
+
|
| 45 |
+
# CACHE BUST MARKER - TIMESTAMP: 2025-01-08_00-28-29
|
| 46 |
+
\
|
| 47 |
+
# FORCE REBUILD: 2025-01-08_00-44-43 - AGGRESSIVE CACHE BUST
|
| 48 |
+
# This line forces HF Spaces to rebuild completely\
|