Skip to content

Commit 65082b3

Browse files
authored
fix: Add named volumes for Windows Docker compatibility (#8661)
- Added named volumes (models, images) to docker-compose.yaml - Added named volumes (models, backends) to .devcontainer/docker-compose-devcontainer.yml - Changed bind mounts to named volumes for Windows compatibility Fixes #8455 Signed-off-by: localai-bot <localai-bot@users.noreply.github.com> Co-authored-by: localai-bot <localai-bot@users.noreply.github.com>
1 parent 0483d47 commit 65082b3

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

.devcontainer/docker-compose-devcontainer.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ services:
1010
- 8080:8080
1111
volumes:
1212
- localai_workspace:/workspace
13-
- ../models:/host-models
13+
- models:/host-models
14+
- backends:/host-backends
1415
- ./customization:/devcontainer-customization
1516
command: /bin/sh -c "while sleep 1000; do :; done"
1617
cap_add:
@@ -39,6 +40,9 @@ services:
3940
- GF_SECURITY_ADMIN_PASSWORD=grafana
4041
volumes:
4142
- ./grafana:/etc/grafana/provisioning/datasources
43+
4244
volumes:
4345
prom_data:
44-
localai_workspace:
46+
localai_workspace:
47+
models:
48+
backends:

docker-compose.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,14 @@ services:
2020
- MODELS_PATH=/models
2121
# - DEBUG=true
2222
volumes:
23-
- ./models:/models:cached
24-
- ./images/:/tmp/generated/images/
23+
- models:/models
24+
- images:/tmp/generated/images/
2525
command:
2626
# Here we can specify a list of models to run (see quickstart https://localai.io/basics/getting_started/#running-models )
2727
# or an URL pointing to a YAML configuration file, for example:
2828
# - https://gist.githubusercontent.com/mudler/ad601a0488b497b69ec549150d9edd18/raw/a8a8869ef1bb7e3830bf5c0bae29a0cce991ff8d/phi-2.yaml
2929
- phi-2
30+
31+
volumes:
32+
models:
33+
images:

0 commit comments

Comments
 (0)