jina-ai / examples

Jina examples and demos to help you get started
https://docs.jina.ai
Apache License 2.0
453 stars 140 forks source link

pokedex: unknown exception: [Errno 13] Permission denied: 'workspace/chunk_compound_indexer-1' #214

Closed alexcg1 closed 4 years ago

alexcg1 commented 4 years ago

Trying to run:

docker run -v "$(pwd)/data:/data" -v "$(pwd)/workspace:/workspace" -e "JINA_LOG_PROFILING=1" -p 5000:5000 jinaai/hub.app.bitsearch index

Throws a whole bunch of errors like:

unknown exception: [Errno 13] Permission denied: 'workspace/chunk_compound_indexer-1'

Context

Log file from Docker: log.txt

JamesTang-616 commented 4 years ago

probably because you installed docker with sudo or with root. After running docker, it create some file in your workspace, like workspace/chunk_compound_indexer-1, do solve this problem, you need to add your current user to docker group. Here are the steps you may want to follow: 1.check where you have docker group

groups

should be like this:

jamestang adm cdrom sudo dip plugdev lpadmin lxd sambashare docker
  1. add user XXX to docker
    usermod -a -G docker XXX
  2. check
    grep docker /etc/group

    it should be like this:

    docker:x:998:jamestang
  3. restart docker
    service docker restart

    5.restart or login again

  4. check if docker works without sudo
    docker images
  5. delete your workspace and run your python app again.