# Qwen Image Layered - Docker Deployment for HF Inference Endpoints This directory contains a custom Docker-based deployment for `QwenImageLayeredPipeline`. ## Files - `Dockerfile`: Custom container with all bleeding-edge dependencies. - `app.py`: FastAPI server (HF-compatible API format). - `handler.py`: Model loading and inference logic. - `requirements.txt`: Python dependencies (all from git main). ## Deployment Steps ### 1. Build and Push Docker Image ```bash # Login to Docker Hub (or another registry) docker login # Build the image docker build -t yourusername/qwen-layered:latest . # Push to registry docker push yourusername/qwen-layered:latest ``` ### 2. Create HF Inference Endpoint 1. Go to [HF Inference Endpoints](https://ui.endpoints.huggingface.co/) 2. Click **New Endpoint** 3. Select **Custom Container** 4. Enter your Docker image URL: `docker.io/yourusername/qwen-layered:latest` 5. Select GPU (A10G or better, 24GB+ VRAM) 6. Deploy ### 3. Usage ```bash curl https://your-endpoint.endpoints.huggingface.cloud \ -X POST \ -d '{"inputs": {"prompt": "A cute cat"}}' \ -H "Authorization: Bearer hf_..." \ -H "Content-Type: application/json" ``` ## Local Testing ```bash docker build -t qwen-test . docker run --gpus all -p 8080:8080 qwen-test # Then: curl http://localhost:8080/health ```