FROM ubuntu:22.04 ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ curl \ ca-certificates \ python3 \ python3-pip \ zstd \ bash \ && rm -rf /var/lib/apt/lists/* # Install Ollama RUN curl -fsSL https://ollama.com/install.sh | sh WORKDIR /app COPY requirements.txt /app/requirements.txt RUN pip3 install --no-cache-dir -r /app/requirements.txt COPY app.py /app/app.py COPY start.sh /app/start.sh RUN chmod +x /app/start.sh # Hugging Face Docker Spaces must listen on 7860 EXPOSE 7860 # Change this to a different Qwen model if needed ENV OLLAMA_MODEL=qwen2.5:0.5b CMD ["/app/start.sh"]