Spaces:
Runtime error
Runtime error
| # Use an official lightweight Linux distribution as a base | |
| FROM ubuntu:22.04 | |
| # Set environment variables | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| # Update and install essential dependencies | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| curl \ | |
| wget \ | |
| git \ | |
| ca-certificates \ | |
| build-essential \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Install Ollama | |
| RUN curl -fsSL https://ollama.com/install.sh | sh | |
| # Set up a non-root user for better security and permissions | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| # Set the working directory | |
| WORKDIR /home/user/app | |
| # Expose the port the app will use (default for Ollama is 11434) | |
| EXPOSE 11434 | |
| # Command to pull the model and serve it | |
| CMD ["ollama", "pull", "nomic-embed-text"] | |