# ====================================================== # 🚀 Hugging Face Space for Qwen3-0.6B-ONNX # ====================================================== # Use an official Python image FROM python:3.10-slim # Install OS and Python dependencies RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* RUN pip install --no-cache-dir onnxruntime gradio huggingface_hub numpy transformers # Download the ONNX model from the Hugging Face Hub RUN python3 -c "\ from huggingface_hub import hf_hub_download; \ hf_hub_download(repo_id='onnx-community/Qwen3-0.6B-ONNX', filename='model.onnx', local_dir='/models'); \ hf_hub_download(repo_id='onnx-community/Qwen3-0.6B-ONNX', filename='config.json', local_dir='/models'); \ " # Copy app COPY app.py /app/app.py WORKDIR /app # Expose port used by Gradio EXPOSE 7860 # Start the app CMD [\"python3\", \"app.py\"]