Update Docker
Squash commit that merges #43, #44, and #45 Create .dockerignore Make compose marginally better Un-scuffed the Dockerfile
This commit is contained in:
parent
5dc2df68be
commit
e70729b0c0
3 changed files with 13 additions and 9 deletions
1
.dockerignore
Normal file
1
.dockerignore
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
models/
|
||||||
11
Dockerfile
11
Dockerfile
|
|
@ -10,8 +10,8 @@ RUN apt-get update && apt-get install -y \
|
||||||
# Set the working directory in the container
|
# Set the working directory in the container
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
# Copy the current directory contents into the container at /usr/src/app
|
# Get requirements
|
||||||
COPY . .
|
COPY requirements.txt requirements.txt
|
||||||
|
|
||||||
# Install torch with CUDA support and exllamav2
|
# Install torch with CUDA support and exllamav2
|
||||||
RUN pip install torch --extra-index-url https://download.pytorch.org/whl/cu121
|
RUN pip install torch --extra-index-url https://download.pytorch.org/whl/cu121
|
||||||
|
|
@ -20,14 +20,11 @@ RUN pip install exllamav2
|
||||||
# Install any other needed packages specified in requirements.txt
|
# Install any other needed packages specified in requirements.txt
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
# Copy the sample config file to the main config
|
# Copy the current directory contents into the container at /usr/src/app
|
||||||
RUN cp config_sample.yml config.yml
|
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
|
||||||
|
|
||||||
# Define environment variable
|
|
||||||
ENV NAME World
|
|
||||||
|
|
||||||
# Run main.py when the container launches
|
# Run main.py when the container launches
|
||||||
CMD ["python3", "main.py"]
|
CMD ["python3", "main.py"]
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,15 @@ services:
|
||||||
INSTALL_FSCHAT: "true" # Set this to "true" or "false" as needed
|
INSTALL_FSCHAT: "true" # Set this to "true" or "false" as needed
|
||||||
ports:
|
ports:
|
||||||
- "5000:5000"
|
- "5000:5000"
|
||||||
runtime: nvidia
|
|
||||||
environment:
|
environment:
|
||||||
- NAME=TabbyAPI
|
- NAME=TabbyAPI
|
||||||
- NVIDIA_VISIBLE_DEVICES=all
|
- NVIDIA_VISIBLE_DEVICES=all
|
||||||
volumes:
|
volumes:
|
||||||
- /mnt/nvme/models:/usr/src/app/models
|
- ./models:/usr/src/app/models
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
reservations:
|
||||||
|
devices:
|
||||||
|
- driver: nvidia
|
||||||
|
count: all
|
||||||
|
capabilities: [gpu]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue