ollama-server / Dockerfile
Yakova's picture
Update Dockerfile
6b868ed
raw
history blame
572 Bytes
# Builder stage
FROM python:3.9.0 as builder
RUN useradd -ms /bin/bash admin
WORKDIR /srv
RUN chown -R admin:admin /srv
RUN chmod 755 /srv
# Install dependencies and Python packages
RUN apt-get update && apt-get install -y git ffmpeg aria2 \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the application code
USER admin
COPY --chown=admin . /srv
# Command to run the application
CMD export PYTHONPATH="${PYTHONPATH}:./src" && python3 ./src/app.py
# Expose the server port
EXPOSE 7860