Giter Club home page Giter Club logo

conda-store's People

Contributors

adam-d-lewis avatar aisis-julian avatar alanbraz avatar anirrudh avatar asmeurer avatar claytonastrom avatar costrouc avatar dcmcand avatar dependabot[bot] avatar discdiver avatar gabalafou avatar harshcasper avatar iameskild avatar jaimergp avatar jonzeper avatar junaishima avatar kcpevey avatar leej3 avatar nkaretnikov avatar pavithraes avatar peytondmurray avatar pierrotsmnrd avatar pre-commit-ci[bot] avatar saulshanabrook avatar steff456 avatar telamonian avatar trallard avatar tylerpotts avatar viniciusdc avatar yuvipanda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

conda-store's Issues

Docker registry ad-hok environments

Example schema

docker run -it "localhost:5000/conda-store/numba/numpy/asdf.lt.3.0" /opt/conda/bin/python

Docker registry uses localhost:5000/<namespace>/<environment-name>. We will have the conda-store* namespaces reserved. And not allowed to end users. We propose conda-store-dynamic namespace be for dymamic environments. E.g.

And example image spec localhost:5000/conda-store-dynamic/numpy.ge.1.10/numba/flask

Comparison

  • .lt. less than
  • .gt. greater than
  • .ge. greater than equal
  • .le. less than equal
  • .eq. equal

The following will render to

name: conda-store-dynamic/numpy.ge.1.10/numba/flask?
dependencies:
 - numpy >= 1.10
 - numba
 - flask

Conda-store will then dynanically build the docker image and then send it to the client.

conda-docker error when building docker image

- [Errno 2] No such file or directory: '/opt/conda/standalone_conda/conda.exe' -> '/tmp/tmp_lg6gog3/_conda.exe'
conda-store-build_1   | Traceback (most recent call last):
conda-store-build_1   |   File "/opt/conda-store-server/conda_store_server/build.py", line 210, in conda_build
conda-store-build_1   |     build_docker_image(conda_store, build_path, build)
conda-store-build_1   |   File "/opt/conda-store-server/conda_store_server/build.py", line 263, in build_docker_image
conda-store-build_1   |     image = build_docker_environment_image(
conda-store-build_1   |   File "/opt/conda/envs/conda-store-server/lib/python3.9/site-packages/conda_docker/conda.py", line 637, in build_docker_environment_image
conda-store-build_1   |     chroot_install(
conda-store-build_1   |   File "/opt/conda/envs/conda-store-server/lib/python3.9/site-packages/conda_docker/conda.py", line 417, in chroot_install
conda-store-build_1   |     copy_func(orig_standalone, host_standalone)
conda-store-build_1   | FileNotFoundError: [Errno 2] No such file or directory: '/opt/conda/standalone_conda/conda.exe' -> '/tmp/tmp_lg6gog3/_conda.exe'
conda-store-build_1   | [2021-02-25 23:12:54,430] {/opt/conda-store-server/conda_store_server/build.py:57} INFO - 

conda-store API additions

issue to track things that needed to be added/deleted from the API:

[ ] expose docker image download
[ ] expose archive download

Conda-store jupyterlab-extension using jupyterlab 3

User story 1:

  • user should be able to create and edit an existing environment
  • after awhile should be able to change to the environment with nb_conda_kernel

User story 2:

  • user should be able to delete an environment

Extending environment.yaml file to support additional operations

Often times there are additional actions that a user would like to do after a deployment:

  • run a command after installation for example
  • chmod, chown the files

It would be nice to support additional package managers that allow installation at custom prefixes. I'm thinking of node, go, and possibly a few others.

Catching memory errors with conda solves

Often times conda-store will fail due to exhausting the memory of the available memory when trying to solve for the conda environment. This issue is hard to catch since the conda solver is killed by the linux via OOM. In other places (e.g. dask workers) they use a nanny to monitor the process to see if it is killied. This is likely a hard issue to solve and with the prefered use of mamba now may be less of a problem since it uses significantly less memory.

Add finer information on state of conda-store environment builds

I've had several env build failures recently (various reasons) that weren't caught by ci testing. On multiple occasions we've had to go into kubectl/k9s to see the failure or were it got hung up.

I like how everything is automated here, but when my gh action for deployment is showing "green" its misleading that the deployment is complete. I'd like some tooling (or documentation) to tell me how to set up kubectl to see what's going on after gh actions has done it's thing.

I know the pretense is that qhub is k8s for people who don't know k8s, but I need some additional monitoring capability.

Limiting API Requests on Server-Side

@costrouc, as I use the API I am realizing there is a very real need for us to limit server side requests. I can easily put in a PR for this - is this something we have thought about doing yet?

Environment name unique naming should also a function of time not just sha256 of environment.yaml

Current database model

Environment -> (specification_sha256, build_id)

build_id -> specification_sha256

specification_id (doesn't point to anything)

Proposal

If you build a conda environment at a set point in time it will result in a different set of packages than if it was built 1 day ago. Thus it doesn't make much sense for the artifact to have the specification sha 256 to be in the name.

I want to support a (rebuild) environment action. Thus I really don't think that a specficaition_id is useful when talking about an environment.

Environment -> build_id -> specification_sha256

Error when fetching base image from docker hub

Traceback (most recent call last):

  File "/opt/conda-store/conda_store/build.py", line 210, in conda_build

    build_docker_image(conda_store, build_path, build)

  File "/opt/conda-store/conda_store/build.py", line 263, in build_docker_image

    image = build_docker_environment_image(

  File "/opt/conda/envs/conda-store/lib/python3.9/site-packages/conda_docker/conda.py", line 631, in build_docker_environment_image

    image = pull_image(base_image_name, base_image_tag)

  File "/opt/conda/envs/conda-store/lib/python3.9/site-packages/conda_docker/registry/client.py", line 46, in pull_image

    digest = get_blob(image, blob["blobSum"], token)

  File "/opt/conda/envs/conda-store/lib/python3.9/site-packages/conda_docker/registry/client.py", line 36, in get_blob

    return gzip.decompress(get_request(url, headers))

  File "/opt/conda/envs/conda-store/lib/python3.9/site-packages/conda_docker/registry/client.py", line 17, in get_request

    return urlopen(request).read()

  File "/opt/conda/envs/conda-store/lib/python3.9/urllib/request.py", line 214, in urlopen

    return opener.open(url, data, timeout)

  File "/opt/conda/envs/conda-store/lib/python3.9/urllib/request.py", line 523, in open

    response = meth(req, response)

  File "/opt/conda/envs/conda-store/lib/python3.9/urllib/request.py", line 632, in http_response

    response = self.parent.error(

  File "/opt/conda/envs/conda-store/lib/python3.9/urllib/request.py", line 555, in error

    result = self._call_chain(*args)

  File "/opt/conda/envs/conda-store/lib/python3.9/urllib/request.py", line 494, in _call_chain

    result = func(*args)

  File "/opt/conda/envs/conda-store/lib/python3.9/urllib/request.py", line 747, in http_error_302

    return self.parent.open(new, timeout=req.timeout)

  File "/opt/conda/envs/conda-store/lib/python3.9/urllib/request.py", line 523, in open

    response = meth(req, response)

  File "/opt/conda/envs/conda-store/lib/python3.9/urllib/request.py", line 632, in http_response

    response = self.parent.error(

  File "/opt/conda/envs/conda-store/lib/python3.9/urllib/request.py", line 561, in error

    return self._call_chain(*args)

  File "/opt/conda/envs/conda-store/lib/python3.9/urllib/request.py", line 494, in _call_chain

    result = func(*args)

  File "/opt/conda/envs/conda-store/lib/python3.9/urllib/request.py", line 641, in http_error_default

    raise HTTPError(req.full_url, code, msg, hdrs, fp)

urllib.error.HTTPError: HTTP Error 400: Bad Request

linuxbrew store [enhancement]

Copied from nebari-dev/nebari#310:

Conda-store provides a great solution for serving environments to jupyterlab instances.
Linuxbrew is a user level package manager that stores files in /home/linuxbrew.
I was thinking it would be useful to be able to serve up Linuxbrew packages centrally similar to conda-store.
I am not sure if something like this could be integrated directly into conda-store, or if a separate tool should be created for this.

Any thoughts, ideas, or suggestions would be appreciated.

Tests are out of date

It looks like the tests/ folder is out of date. It tries to import conda_store instead of conda_store_server, and most are failing.

Store references build to artifats in database

E.g. create Table artifacts

artifact:
    id: int
    type: enum.Enum (build artifact type)
    key: string
    sha256: string
    build_id: int

This would be required for garbage collection of builds.

build starting again since past timeout

Conda-store ran out of space on our qhub deployment, so I opened a shell through k9s to remove old copies of environments to free up space. Once complete, and the timeout elapsed, conda-store successfully built the updated environment.
However, now every 10s there is a message in the logs stating build starting again since past timeout. This seems to be a bug in conda-store. I suspect that for now the most appropriate course of action is to kill the pod so it can restart, but this will affect on-going processing so I will need to wait for the cluster to not be in use.

@kcpevey, @costrouc

Conda Store Authentication Mechanism

Conda-store needs to have an authentication mechanism. The first step would be to make conda-store integrate with jupyterhub.

There would be a general authentication class similar to jupyterhub that will authenticate a given user and return user and groups that they are a member of.

Then a simple authorization mechanism would be added. Each namespace has read, write, list permissions.

A preliminary authorization mechanism would be read-only if username != namespace and namespace not in groups.

Would require token based authentication and oauth client authenticaiton.

Depends on #61.

Copy `environment.yaml` file to tmp directory to allow for pip dependencies

For some reason when including pip dependencies conda env build ... expects the directory where it finds environment.yaml to allow writes. Why it doesn't try to create a requirements.txt file in a temporary directory I don't know.

      File "/opt/conda/lib/python3.7/site-packages/conda/exceptions.py", line 1079, in __call__
        return func(*args, **kwargs)
      File "/opt/conda/lib/python3.7/site-packages/conda_env/cli/main.py", line 80, in do_call
        exit_code = getattr(module, func_name)(args, parser)
      File "/opt/conda/lib/python3.7/site-packages/conda_env/cli/main_create.py", line 111, in execute
        result[installer_type] = installer.install(prefix, pkg_specs, args, env)
      File "/opt/conda/lib/python3.7/site-packages/conda_env/installers/pip.py", line 41, in _pip_install_via_requirements
        delete=False)
      File "/opt/conda/lib/python3.7/site-packages/conda/_vendor/auxlib/compat.py", line 80, in Utf8NamedTemporaryFile
        dir=dir, delete=delete)
      File "/opt/conda/lib/python3.7/tempfile.py", line 547, in NamedTemporaryFile
        (fd, name) = _mkstemp_inner(dir, prefix, suffix, flags, output_type)
      File "/opt/conda/lib/python3.7/tempfile.py", line 258, in _mkstemp_inner
        fd = _os.open(file, flags, 0o600)
    OSError: [Errno 30] Read-only file system: '/opt/environments/condaenv.ry3f68ir.requirements.txt'

`$ /opt/conda/bin/conda-env create -p /home/conda/store/575144b1e7ed38e31d35f09c174c21151f66c7c7ae507d2f1eb13b4cb65beb88-scipy2020 -f /opt/environments/environment-scipy2020-geospatial.yaml`

Conda-Store Environments Return `None`

Conda-Store environments return "None" for spec and build since they are not built at time yet.

The bigger discussion around this is: "What do we call environments that haven't had successful builds yet?"

cc: @costrouc

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.