Files
llamacpp_embedding/docker-compose.yml
T
2026-09-22 06:03:19 +07:00

72 lines
2.6 KiB
YAML
Executable File

# You should know that Docker Compose works with services.
# 1 service = 1 container.
# For example, a service, a server, a client, a database...
# We use the keyword 'services' to start to create services.
services:
app: # service name
container_name: llamacpp_embedding_instance_1
build: ./app
image: llamacpp_embedding_instance_1
restart: always
environment:
- TZ=Asia/Bangkok
- MODELFILENAME=Qwen3-Embedding-0.6B-Q8_0.gguf
- SERVERARGS=--host 0.0.0.0 --port 8080 --embeddings -ngl 0
# network_mode: "app-network"
# networks:
# - default
ports:
- 9010:8080
volumes:
- ./mountvolume:/appfolder/mountvolume
# privileged: true
deploy:
resources:
limits:
cpus: '10'
# # memory: 7200M
# reservations:
# devices:
# - driver: nvidia
# device_ids: ['3'] # choose between device_ids or count
# capabilities: [gpu]
# The name of our service is "database"
# but you can use the name of your choice.
# Note: This may change the commands you are going to use a little bit.
# database:
# # Official Postgres image from DockerHub (we use the last version)
# image: 'postgres:latest'
# By default, a Postgres database is running on the 5432 port.
# If we want to access the database from our computer (outside the container),
# we must share the port with our computer's port.
# The syntax is [port we want on our machine]:[port we want to retrieve in the container]
# Note: You are free to change your computer's port,
# but take into consideration that it will change the way
# you are connecting to your database.
# networks:
# - backend
# ports:
# - 5432:5432
# environment:
# POSTGRES_USER: username # The PostgreSQL user (useful to connect to the database)
# POSTGRES_PASSWORD: password # The PostgreSQL password (useful to connect to the database)
# volumes:
# # In this example, we share the folder `db-data` in our root repository, with the default PostgreSQL data path.
# # It means that every time the repository is modifying the data inside
# # of `/var/lib/postgresql/data/`, automatically the change will appear in `db-data`.
# # You don't need to create the `db-data` folder. Docker Compose will do it for you.
# - ./mountvolume/dbdata/:/var/lib/postgresql/data/
# networks:
# default:
# name: https-network
# driver: bridge
# external: true