Rename, fschat support
This commit is contained in:
parent
99cf0b6d7b
commit
6b22dc0119
2 changed files with 14 additions and 7 deletions
|
|
@ -7,8 +7,11 @@ RUN apt-get update && apt-get install -y \
|
|||
python3-pip \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Alias python and pip to python3 and pip3
|
||||
#RUN ln -s /usr/bin/python3 /usr/bin/python
|
||||
# Define a build-time argument for conditional installation
|
||||
ARG INSTALL_FSCHAT=false
|
||||
|
||||
# Set the environment variable based on the build argument
|
||||
ENV INSTALL_FSCHAT=$INSTALL_FSCHAT
|
||||
|
||||
# Set the working directory in the container
|
||||
WORKDIR /usr/src/app
|
||||
|
|
@ -23,6 +26,9 @@ RUN pip install exllamav2
|
|||
# Install any other needed packages specified in requirements.txt
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Conditional installation of fschat[model_worker]
|
||||
RUN if [ "$INSTALL_FSCHAT" = "true" ] ; then pip install fschat[model_worker] ; fi
|
||||
|
||||
# Copy the sample config file to the main config
|
||||
RUN cp config_sample.yml config.yml
|
||||
|
||||
|
|
@ -34,4 +40,3 @@ ENV NAME World
|
|||
|
||||
# Run main.py when the container launches
|
||||
CMD ["python3", "main.py"]
|
||||
|
||||
|
|
@ -1,13 +1,15 @@
|
|||
version: '3.8'
|
||||
services:
|
||||
tabbyapi:
|
||||
build: .
|
||||
build:
|
||||
context: .
|
||||
args:
|
||||
INSTALL_FSCHAT: "true" # Set this to "true" or "false" as needed
|
||||
ports:
|
||||
- "5000:5000"
|
||||
runtime: nvidia
|
||||
environment:
|
||||
- NAME=TabbyAPI
|
||||
- NVIDIA_VISIBLE_DEVICES=all
|
||||
# volumes:
|
||||
# - /path/to/models:/usr/src/app/models
|
||||
# - /path/to/config:/usr/src/app/config.yml
|
||||
volumes:
|
||||
- /mnt/nvme/models:/usr/src/app/models
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue