Spaces:
Sleeping
Sleeping
Download Dockerfile from Fayzbek/ai-coding-agent-v1: direct link, hf CLI and curl.
- Browser
- Download file 878 Bytes
-
https://huggingface.co/spaces/Fayzbek/ai-coding-agent-v1/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Fayzbek/ai-coding-agent-v1/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Fayzbek/ai-coding-agent-v1/resolve/main/Dockerfile
878 Bytes
| # Yengil Python bazaviy tasviridan foydalanamiz | |
| FROM python:3.11-slim | |
| # Tizim uchun zarur bo'lgan paketlarni o'rnatamiz | |
| RUN apt-get update && apt-get install -y \ | |
| curl \ | |
| zstd \ | |
| procps \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Ollama'ni o'rnatish | |
| RUN curl -fsSL https://ollama.com/install.sh | sh | |
| # Ishchi katalog | |
| WORKDIR /app | |
| # Requirements faylini ko'chirib, o'rnatamiz | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Barcha kod fayllarini ko'chiramiz | |
| COPY . . | |
| # Modelni build jarayonida yuklab olish (serverni vaqtincha ishga tushirib) | |
| RUN ollama serve & sleep 20 && ollama pull qwen2.5:3b && pkill ollama | |
| # Hugging Face uchun kerakli port | |
| EXPOSE 7860 | |
| # FastAPI ni ishga tushirish | |
| # Ollama'ni fonda ishga tushirib, FastAPI'ni kutib turadi | |
| CMD ["sh", "-c", "ollama serve & sleep 10 && uvicorn main:app --host 0.0.0.0 --port 7860"] | |