tabbyAPI-ollama/docker/Dockerfile
kingbri f70eb11db3 Docker: Use python 3.12
Ubuntu 24.04 ships with 3.12 by default.

Signed-off-by: kingbri <8082010+kingbri1@users.noreply.github.com>
2025-04-27 00:24:32 -04:00

37 lines
871 B
Docker

# Use an official CUDA runtime with Ubuntu as a parent image
FROM nvidia/cuda:12.8.1-runtime-ubuntu24.04
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
curl \
ca-certificates \
python3.12 \
python3-pip \
&& rm -rf /var/lib/apt/lists/*
# Upgrade pip
RUN pip3 install --no-cache-dir --upgrade pip
# Set the working directory in the container
WORKDIR /app
# Get requirements
COPY pyproject.toml .
# Install packages specified in pyproject.toml cu121, extras
RUN pip3 install --no-cache-dir .[cu121,extras]
RUN rm pyproject.toml
# Copy the current directory contents into the container
COPY . .
# Make port 5000 available to the world outside this container
EXPOSE 5000
# Set the entry point
ENTRYPOINT ["python3"]
# Run main.py when the container launches
CMD ["main.py"]