diff --git a/Dockerfile b/Dockerfile index fed57db..9ecc379 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,8 @@ RUN apt-get update --fix-missing && \ apt-get install -y --no-install-recommends \ build-essential \ cmake \ - ninja-build && \ + ninja-build \ + curl && \ apt-get clean && rm -rf /var/lib/apt/lists/* WORKDIR /app diff --git a/app.py b/app.py index c158e0a..c21b731 100644 --- a/app.py +++ b/app.py @@ -933,7 +933,7 @@ def main(): ) logger.info("Launching Gradio Tabbed Interface...") - interface.launch(share=True) + interface.launch(share=False, server_name="0.0.0.0", server_port=7860) if __name__ == "__main__": diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..bfb3961 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,38 @@ +version: '3.8' + +services: + rezero: + build: + context: . + dockerfile: Dockerfile + image: rezero + container_name: rezero + volumes: + - .:/app + # Windows-compatible path for huggingface cache + - ${USERPROFILE}/.cache/huggingface:/root/.cache/huggingface + ports: + - "7860:7860" # Gradio web interface + env_file: + - .env + # Windows with Docker Desktop + WSL2 uses this format + environment: + - NVIDIA_VISIBLE_DEVICES=all + - GRADIO_SERVER_NAME=0.0.0.0 + - GRADIO_SERVER_PORT=7860 + - GRADIO_SHARE=False + - GENERATOR_MODEL_DIR=Menlo/ReZero-v0.1-llama-3.2-3b-it-grpo-250404 + # Use runtime instead of deploy for Windows Docker Desktop + runtime: nvidia + # Create model directory and run the app + command: > + bash -c "mkdir -p /app/models/generator && + python app.py" + restart: unless-stopped + shm_size: 8gb + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:7860/"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 40s \ No newline at end of file