Deploy_FastAPI_Space / Dockerfile
thangquang09
update Dockerfile
0d54045
raw
history blame contribute delete
519 Bytes
FROM python:3.12
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade -r requirements.txt
# Sử dụng thư mục trong /app thay vì /root
ENV OLLAMA_MODELS=/app/.ollama/models
# Tạo thư mục cho Ollama
RUN mkdir -p /app/.ollama && chmod 777 /app/.ollama
# Cài đặt Ollama
RUN curl -fsSL https://ollama.com/install.sh | sh
# Copy application files
COPY . .
# Make scripts executable
RUN chmod +x /app/start.sh
RUN chmod +x /app/pull_models.sh
EXPOSE 7860
CMD ["/app/start.sh"]