-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
META - Support for Windows and MacOS (local) #507
Comments
I was able to run conda-store-server with When I tried creating an environment, I get Traceback (most recent call last):
File "/Users/aaronmeurer/Documents/conda-store/conda-store-server/conda_store_server/build.py", line 278, in build_conda_environment
fetch_and_extract_packages(conda_store, pathlib.Path(tmp_lock_filename))
File "/Users/aaronmeurer/Documents/conda-store/conda-store-server/conda_store_server/build.py", line 197, in fetch_and_extract_packages
with filelock.FileLock(f"{str(filepath)}.lock"):
File "/Users/aaronmeurer/anaconda3/envs/conda-store-server-dev/lib/python3.10/site-packages/filelock/_api.py", line 255, in __enter__
self.acquire()
File "/Users/aaronmeurer/anaconda3/envs/conda-store-server-dev/lib/python3.10/site-packages/filelock/_api.py", line 213, in acquire
self._acquire()
File "/Users/aaronmeurer/anaconda3/envs/conda-store-server-dev/lib/python3.10/site-packages/filelock/_unix.py", line 37, in _acquire
fd = os.open(self.lock_file, open_flags, self._context.mode)
FileNotFoundError: [Errno 2] No such file or directory: '/Users/aaronmeurer/anaconda3/envs/conda-store-server-dev/pkgs/bzip2-1.0.8-h0d85af4_4.tar.bz2.lock' in the build log. Note that I am building off of v0.4.15.2 because main is currently broken because of #520 |
It is also an implicit dependency of conda-docker, but conda-docker may become an optional dependency for Mac (conda-incubator#507).
It looks like this error is coming from the fact that the conda-store-server-dev environment has conda itself installed in it. This causes conda to think that it is the base environment and should have I used pkgs_dirs: ['/Users/aaronmeurer/anaconda3/pkgs'] and I was able to successfully create an environment. Questions:
This smells to me like conda-store-server is actually doing something wrong here. It shouldn't fail because some files in the pkgs cache fail to exist. It's likely just a latent bug here that never gets triggered because the pkgs cache always does end up existing. I'm a little curious what ends up happening here inside of the Docker container build. |
Anyway, I was able to successfully create an environment (as in the environment builds and I can import the packages installed in it). I now get this error when building an environment:
which looks pretty easy to fix. |
Fixes the issue described at conda-incubator#507 (comment) I don't know yet what should be done on Windows. Windows support will need to be investigated separately. It will likely be a lot more work than macOS support.
Fix for the du thing at #537. I now get issues related to conda-docker, which is a known problem (conda-docker doesn't work on Mac and so docker building should just be disabled when we aren't on linux for now). |
@asmeurer totally agree that we need to adjust the defaults and make the conda docker build not default on non-linux systems. A few places where this needs to be configured:
I'm guessing when platform is not linux For the issues releated to conda-docker imports. I'd be fine if we just more the conda-store/conda-store-server/conda_store_server/action/generate_conda_docker.py Lines 3 to 9 in b6be123
|
conda-docker doesn't work on Mac, and making it work is not straightforward, so for now we just disable it when we aren't on Linux. With this and conda-incubator#537, basic Mac support seems to work with --standalone (conda-incubator#507). I'm not sure what else I should be testing, but I can create environments and they appear to be functional.
@asmeurer thanks for checking and getting it to the point that OSX is working! Two things I think that are next:
|
This is built on conda-incubator#549 but I've made in a separate PR because I'm not sure if there will be other issues here and I don't want to block that PR on this (but at the same time, tests won't pass on Mac without the changes from that PR). See conda-incubator#513 and conda-incubator#507
This is built on conda-incubator#549 but I've made in a separate PR because I'm not sure if there will be other issues here and I don't want to block that PR on this (but at the same time, tests won't pass on Mac without the changes from that PR). See conda-incubator#513 and conda-incubator#507
I'm pushing my fixes for Windows to #559 The first thing I notice on Windows is that the "set conda prefix permissions" action is tied to Unix permissions. How do we want to handle this on Windows? Note that currently conda_store_server cannot even be imported on Windows because this line fails
|
Tagging @costrouc for insights |
A much bigger problem: celery doesn't officially support Windows https://docs.celeryq.dev/en/stable/faq.html#windows. From what I've read, it is often possible to get it to work on Windows anyways (see https://stackoverflow.com/questions/37255548/how-to-run-celery-on-windows and https://distributedpython.com/posts/two-ways-to-make-celery-4-run-on-windows/). It's not clear yet to me how much work this would be and how reliable it would be if we did get it working. Already, if you try to start the worker process on Windows, you get an error PS C:\Users\Aaron\Quansight\conda-store\conda-store-server> C:\Users\Aaron\miniconda3\envs\conda-store-server-dev\python.exe -m conda_store_server.worker
Traceback (most recent call last):
File "C:\Users\Aaron\miniconda3\envs\conda-store-server-dev\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\Aaron\miniconda3\envs\conda-store-server-dev\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\Aaron\Quansight\conda-store\conda-store-server\conda_store_server\worker\__main__.py", line 6, in <module>
main()
File "C:\Users\Aaron\miniconda3\envs\conda-store-server-dev\lib\site-packages\traitlets\config\application.py", line 1043, in launch_instance
app.start()
File "C:\Users\Aaron\Quansight\conda-store\conda-store-server\conda_store_server\worker\app.py", line 82, in start
self.conda_store.celery_app.worker_main(argv)
File "C:\Users\Aaron\miniconda3\envs\conda-store-server-dev\lib\site-packages\celery\app\base.py", line 388, in worker_main
self.start(argv=argv)
File "C:\Users\Aaron\miniconda3\envs\conda-store-server-dev\lib\site-packages\celery\app\base.py", line 368, in start
celery.main(args=argv, standalone_mode=False)
File "C:\Users\Aaron\miniconda3\envs\conda-store-server-dev\lib\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
File "C:\Users\Aaron\miniconda3\envs\conda-store-server-dev\lib\site-packages\click\core.py", line 1686, in invoke
sub_ctx = cmd.make_context(cmd_name, args, parent=ctx)
File "C:\Users\Aaron\miniconda3\envs\conda-store-server-dev\lib\site-packages\click\core.py", line 943, in make_context
self.parse_args(ctx, args)
File "C:\Users\Aaron\miniconda3\envs\conda-store-server-dev\lib\site-packages\click\core.py", line 1408, in parse_args
value, args = param.handle_parse_result(ctx, opts, args)
File "C:\Users\Aaron\miniconda3\envs\conda-store-server-dev\lib\site-packages\click\core.py", line 2400, in handle_parse_result
value = self.process_value(ctx, value)
File "C:\Users\Aaron\miniconda3\envs\conda-store-server-dev\lib\site-packages\click\core.py", line 2356, in process_value
File "C:\Users\Aaron\miniconda3\envs\conda-store-server-dev\lib\site-packages\click\core.py", line 2344, in type_cast_value
return convert(value)
File "C:\Users\Aaron\miniconda3\envs\conda-store-server-dev\lib\site-packages\click\core.py", line 2316, in convert
return self.type(value, param=self, ctx=ctx)
File "C:\Users\Aaron\miniconda3\envs\conda-store-server-dev\lib\site-packages\click\types.py", line 83, in __call__
return self.convert(value, param, ctx)
File "C:\Users\Aaron\miniconda3\envs\conda-store-server-dev\lib\site-packages\celery\bin\worker.py", line 29, in convert
self.fail('-B option does not work on Windows. '
File "C:\Users\Aaron\miniconda3\envs\conda-store-server-dev\lib\site-packages\click\types.py", line 136, in fail
raise BadParameter(message, ctx=ctx, param=param)
click.exceptions.BadParameter: -B option does not work on Windows. Please run celery beat as a separate service. |
From today's meeting - @asmeurer can spend some time looking into workarounds (or alternatives) for celery / windows support |
Using some of the workarounds suggested at https://stackoverflow.com/questions/37255548/how-to-run-celery-on-windows, I am able to get celery working enough where I can at least start fixing the issues with individual actions on Windows (there seem to be quite a few). It's a little hard to tell with things still in a nonworking state, but things appear to be quite slow, presumably because the workarounds disable parallelism. |
* Add a macOS worker to the CI This is built on #549 but I've made in a separate PR because I'm not sure if there will be other issues here and I don't want to block that PR on this (but at the same time, tests won't pass on Mac without the changes from that PR). See #513 and #507 * Trigger build * Try not using mamba to fix macos CI * Add a separate macos environment file without conda-docker * Use the macos environment file for macos on CI * Try using mamba on macos again * Revert "Try using mamba on macos again" This reverts commit 031574a. * Install mamba in the dev environment * Go back to using mamba but with the correct syntax this time Revert "Revert "Try using mamba on macos again"" This reverts commit 6cf2877. * Fix CI Revert "Go back to using mamba but with the correct syntax this time" This reverts commit b82c0c8. * Only test docker on Linux
Waiting on PR review from @costrouc |
Initial Windows support has just landed as part of #640 (most of the work there was done by Aaron). It makes it possible to run on Windows in |
This issue has already been addressed in #640. @nkaretnikov needs to go through this issue and make sure that all the subtasks have been addressed. |
Potential issues here:
|
Also to be noted:
|
Background
Currently,
conda-store
is limited to Linux-based systems use.To better serve our community, we'd need to ensure it is Windows and MacOS compatible.
Tasks
General
conda-store
data #648Windows
macOS
The text was updated successfully, but these errors were encountered: