mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-03-14 15:57:27 +00:00
fix: Dockerfile work on pyproject.toml
This commit is contained in:
@@ -1,26 +1,39 @@
|
|||||||
# Use an official CUDA runtime with Ubuntu as a parent image
|
# Use an official CUDA runtime with Ubuntu as a parent image
|
||||||
FROM nvidia/cuda:12.2.0-devel-ubuntu22.04
|
FROM nvidia/cuda:12.2.0-devel-ubuntu22.04
|
||||||
|
|
||||||
|
# Set the working directory in the container
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Install system dependencies
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
build-essential \
|
||||||
|
curl \
|
||||||
|
ca-certificates \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Install Python and pip
|
# Install Python and pip
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
python3.11 \
|
python3.11 \
|
||||||
python3-pip \
|
python3-pip \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Set the working directory in the container
|
# Upgrade pip
|
||||||
WORKDIR /usr/src/app
|
RUN pip3 install --no-cache-dir --upgrade pip
|
||||||
|
|
||||||
# Get requirements
|
# Get requirements
|
||||||
COPY requirements.txt requirements.txt
|
COPY pyproject.toml .
|
||||||
|
|
||||||
# Install packages specified in requirements.txt
|
# Install packages specified in pyproject.toml cu121
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN pip3 install --no-cache-dir .[cu121]
|
||||||
|
|
||||||
# Copy the current directory contents into the container at /usr/src/app
|
# Copy the current directory contents into the container
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Make port 5000 available to the world outside this container
|
# Make port 5000 available to the world outside this container
|
||||||
EXPOSE 5000
|
EXPOSE 5000
|
||||||
|
|
||||||
|
# Set the entry point
|
||||||
|
ENTRYPOINT ["python3"]
|
||||||
|
|
||||||
# Run main.py when the container launches
|
# Run main.py when the container launches
|
||||||
CMD ["python3", "main.py"]
|
CMD ["main.py"]
|
||||||
Reference in New Issue
Block a user