Giter VIP home page Giter VIP logo

Comments (10)

louis-jan avatar louis-jan commented on July 28, 2024 1

Could you confirm if you want to modify the container's 'models' folder from the host machine? If so, I think you should consider using a Docker Mount Volume.

The data within the container should be sandboxed after it is deployed.

from jan.

HyperCrowd avatar HyperCrowd commented on July 28, 2024

It looks like there are API commands to stop and start models, however, my models are still empty

Screenshot from 2024-02-22 14-58-00

from jan.

HyperCrowd avatar HyperCrowd commented on July 28, 2024

Walking through this code to figure out why GET /models returns an empty array. I'll add console.debugs everywhere and post the result

Screenshot from 2024-02-22 15-06-01

from jan.

HyperCrowd avatar HyperCrowd commented on July 28, 2024

Never mind, I cannot even get to that function. I get booted at getBuilder:

Screenshot from 2024-02-22 15-24-44

The output of that console.debug is the following:

Screenshot from 2024-02-22 15-24-57

When I docker exec -it <containerId> /bin/bash into the instance and run the following command, the models folder is not there:

Screenshot from 2024-02-22 15-27-52

Before I ran the docker, I created a symlink in jan/server/build/models to point to jan/models, yet, it appears they did not copy

Screenshot from 2024-02-22 15-28-22

from jan.

HyperCrowd avatar HyperCrowd commented on July 28, 2024

I can finally get the list populated:

cd jan
docker-compose --profile cpu-fs up -d
docker exec -it $(docker ps -q --filter ancestor=jan:latest) /bin/bash

# Once in docker, run:
cd server/build/jan/ && ln -s ../../../models models && exit

Attempting to start the model now...

from jan.

HyperCrowd avatar HyperCrowd commented on July 28, 2024

I can finally start the Mistral model with the following command:

curl -X PUT 'http://localhost:1337/v1/models/mistral-ins-7b-q4/start' -H 'Accept: application/json' -H 'Content-Type: application/json' -d '{}'

Output: {"message":"Model mistral-ins-7b-q4 started"}

In summary, to fix this problem at the developer level:

  • Add a symlink in /app/server/build/jan called models and point it to /app/models during the Docker build process (Dockerfile and Dockerfile.gpu)
  • Update Swagger YAMLs and documentation to expose the PUT /model/:model_id/start and PUT /model/:model_id/stop commands
  • Update Getting Started documentation to point out that the models have to be started when in Local Server mode

from jan.

HyperCrowd avatar HyperCrowd commented on July 28, 2024

I'll provide updates on how to bake this solution into the Dockerfiles at some point in the close future

And probably pack that into a PR

from jan.

HyperCrowd avatar HyperCrowd commented on July 28, 2024

Adding this after the COPY commands in the Dockerfiles should work (Branching appears protected)

RUN cd server/build/jan/ && ln -s ../../../models models

from jan.

HyperCrowd avatar HyperCrowd commented on July 28, 2024

Could you confirm if you want to modify the container's 'models' folder from the host machine? If so, I think you should consider using a Docker Mount Volume.

The data within the container should be sandboxed after it is deployed.

I'll check to see if VOLUMES works with and without the symlink

from jan.

louis-jan avatar louis-jan commented on July 28, 2024

Please let us know if this works, @HyperCrowd. We will close it as not planned for now. Please feel free to reopen it.

from jan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.