# named volume 'ollama' is marked as "external" (used by service 'ollama'), so either remove "external" from volume definition or it needs to be created using: docker volume create ollama
name: ollama
services:
    ollama:
        # required to have access to AMD gpus (idk about nvidia)
        devices:
            - /dev/kfd
            - /dev/dri
        volumes:
            # I put conf files in the local dir of the compose file, if you dont wanna do that you can use this instead:
            #- ollama:/root/.ollama
            - ./ollama:/root/.ollama
        ports:
            - 11434:11434
        container_name: ollama
        # ollama:rocm is specifically for AMD gpus
        image: ollama/ollama:rocm
volumes:
    ollama:
        external: true
        name: ollama
