prologin / camisole Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://gitlab.com/prologin/tech/services/camisole
License: Other
Home Page: https://gitlab.com/prologin/tech/services/camisole
License: Other
error CS2001: Source file `/box/source.cs' could not be found
Hi,
I freshly installed Isolate than Camisole under ubuntu 20.04 on an arm computer.
isolate-check-environment
produces :
WARNING: the memory is not present. isolate --cg cannot be used.
Checking for cgroup support for cpuacct ... PASS
Checking for cgroup support for cpuset ... PASS
Checking for swap ... PASS
Checking for CPU frequency scaling ... PASS
Checking for kernel address space randomisation ... PASS
Checking for transparent hugepage support ... PASS
but camisole test
crashes :
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/firefly/Documents/git/camisole/camisole/__main__.py", line 58, in <module>
main()
File "/home/firefly/Documents/git/camisole/camisole/__main__.py", line 54, in main
sys.exit(func(args))
File "/home/firefly/Documents/git/camisole/camisole/progs/test.py", line 12, in handle
return asyncio.get_event_loop().run_until_complete(check)
File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "/home/firefly/Documents/git/camisole/camisole/progs/languages.py", line 24, in print_working_languages
success, raw = res[i].result()
File "/home/firefly/Documents/git/camisole/camisole/ref.py", line 8, in test
raw_result = await lang.run()
File "/home/firefly/Documents/git/camisole/camisole/models.py", line 214, in run
binary = await self.run_compilation(result)
File "/home/firefly/Documents/git/camisole/camisole/models.py", line 183, in run_compilation
cretcode, info, binary = await self.compile()
File "/home/firefly/Documents/git/camisole/camisole/models.py", line 145, in compile
async with isolator:
File "/home/firefly/Documents/git/camisole/camisole/isolate.py", line 122, in __aenter__
busy = {int(p.name) for p in self.isolate_conf.root.iterdir()}
File "/home/firefly/Documents/git/camisole/camisole/utils.py", line 95, in __get__
res = self.func(cls)
File "/home/firefly/Documents/git/camisole/camisole/isolate.py", line 269, in isolate_conf
parser.read_file(dummy_section())
File "/usr/lib/python3.8/configparser.py", line 718, in read_file
self._read(f, source)
File "/usr/lib/python3.8/configparser.py", line 1017, in _read
for lineno, line in enumerate(fp, start=1):
File "/home/firefly/Documents/git/camisole/camisole/isolate.py", line 268, in dummy_section
yield from f
File "/usr/lib/python3.8/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb7 in position 18: invalid start byte
I have no clue about what is going wrong, do you ?
Best regards :)
Once and for all. I prefer wall-time, it's the grammatically correct order.
Is there a work-around to test (small) multi-line Python code ? For instance, small functions (5 lines).
Jsonschema error messages suck and the binary handling is hacky
Originally posted 2017-01-10 18:39 by serialk on Bitbucket
A bit like the /test endpoint but in CLI, and with a cleaner and colored output. The goal is for a human to check quickly which languages do work and see what fails and why.
Hello,
When trying to set up camisole onto a computer running Ubuntu Server 20.04, I used the instructions on the documentation page for manual installation. I got through all of the steps, but when I run camisole test
or try to send the request given in the README, I get a UnicodeDecodeError. Specifically, I get:
Traceback (most recent call last):
File "/usr/local/bin/camisole", line 11, in <module>
load_entry_point('camisole==1.4', 'console_scripts', 'camisole')()
File "/usr/local/lib/python3.8/dist-packages/camisole-1.4-py3.8.egg/camisole/__main__.py", line 54, in main
File "/usr/local/lib/python3.8/dist-packages/camisole-1.4-py3.8.egg/camisole/progs/test.py", line 12, in handle
File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "/usr/local/lib/python3.8/dist-packages/camisole-1.4-py3.8.egg/camisole/progs/languages.py", line 24, in print_working_languages
File "/usr/local/lib/python3.8/dist-packages/camisole-1.4-py3.8.egg/camisole/ref.py", line 8, in test
File "/usr/local/lib/python3.8/dist-packages/camisole-1.4-py3.8.egg/camisole/models.py", line 212, in run
File "/usr/local/lib/python3.8/dist-packages/camisole-1.4-py3.8.egg/camisole/models.py", line 181, in run_compilation
File "/usr/local/lib/python3.8/dist-packages/camisole-1.4-py3.8.egg/camisole/models.py", line 144, in compile
File "/usr/local/lib/python3.8/dist-packages/camisole-1.4-py3.8.egg/camisole/isolate.py", line 100, in __aenter__
File "/usr/local/lib/python3.8/dist-packages/camisole-1.4-py3.8.egg/camisole/utils.py", line 95, in __get__
File "/usr/local/lib/python3.8/dist-packages/camisole-1.4-py3.8.egg/camisole/isolate.py", line 239, in isolate_conf
File "/usr/lib/python3.8/configparser.py", line 718, in read_file
self._read(f, source)
File "/usr/lib/python3.8/configparser.py", line 1017, in _read
for lineno, line in enumerate(fp, start=1):
File "/usr/local/lib/python3.8/dist-packages/camisole-1.4-py3.8.egg/camisole/isolate.py", line 237, in dummy_section
File "/usr/lib/python3.8/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd8 in position 96: invalid continuation byte
I've tried deleting the binary that running the installation creates and reinstalling camisole, but this doesn't seem to have fixed anything. Why is this happening?
Originally posted 2017-02-13 20:30 by serialk on Bitbucket
Originally posted 2016-12-18 19:01 by Zopieux on Bitbucket
Originally posted 2017-01-28 14:24 by Zopieux on Bitbucket
Originally posted 2017-01-10 18:41 by serialk on Bitbucket
Using __class__.__name__
is a cool default but I think we should give more control to the user (like using a name descriptor that gives __class__.__name__
when not set).
Originally posted 2017-01-10 18:15 by serialk on Bitbucket
I suggest we use long polling to queue requests, we set a fixed size of concurrent things that can execute in parallel that we can configure (/etc/camisole.conf?) and we add an endpoint to see how many items are queued, what's the average waiting time, etc.
When accessing to the /system
endpoint, camisole's httpserver throws this error:
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/camisole/httpserver.py", line 89, in wrapper
result = await wrapped(request, data)
File "/usr/lib/python3.7/site-packages/camisole/httpserver.py", line 129, in system_handler
return {'system': camisole.system.info()}
File "/usr/lib/python3.7/site-packages/camisole/system.py", line 49, in info
'cpu_cache_L1d': parse_size(cpu.get('L1d cache')),
File "/usr/lib/python3.7/site-packages/camisole/utils.py", line 34, in parse_size
return int(str_size)
ValueError: invalid literal for int() with base 10: '32 ki'
Is there a way to run a Python program with external pip packages ? e.g either by installing them on the go, or by defining a Python environment where the packages were installed beforehand ?
Recently tried to compile my Docker back after 2 years. It doesn't work anymore for this reason :
linux@linux-VirtualBox:~/_GIT/GH/Kochise/docker-camisole$ sudo docker run --network host -it --rm --privileged --entrypoint bash camisole
[sudo] password for linux:
mcmurphy@linux-VirtualBox:/app$ camisole test -vvv
Traceback (most recent call last):
File "/usr/bin/camisole", line 10, in <module>
from importlib.metadata import distribution
ModuleNotFoundError: No module named 'importlib.metadata'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/camisole", line 13, in <module>
from importlib_metadata import distribution
ModuleNotFoundError: No module named 'importlib_metadata'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/camisole", line 15, in <module>
from pkg_resources import load_entry_point
File "/usr/local/lib/python3.7/dist-packages/pkg_resources/__init__.py", line 3259, in <module>
@_call_aside
File "/usr/local/lib/python3.7/dist-packages/pkg_resources/__init__.py", line 3234, in _call_aside
f(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/pkg_resources/__init__.py", line 3272, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/local/lib/python3.7/dist-packages/pkg_resources/__init__.py", line 581, in _build_master
ws.require(__requires__)
File "/usr/local/lib/python3.7/dist-packages/pkg_resources/__init__.py", line 909, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/local/lib/python3.7/dist-packages/pkg_resources/__init__.py", line 795, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'camisole==1.5.dev35+gf0f3daf' distribution was not found and is required by the application
mcmurphy@linux-VirtualBox:/app$
Nothing changed on my side. So if you have an idea...
See ioi/isolate#26
Originally posted 2017-02-13 20:31 by serialk on Bitbucket
Traceback:
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/camisole/camisole/camisole/__main__.py", line 118, in <module>
main()
File "/home/camisole/camisole/camisole/__main__.py", line 105, in main
loop.run_until_complete(print_working_languages(languages, verbosity))
File "/usr/lib/python3.6/asyncio/base_events.py", line 466, in run_until_complete
return future.result()
File "/home/camisole/camisole/camisole/__main__.py", line 32, in print_working_languages
print(indent(extract_fail_message(raw).strip()))
File "/home/camisole/camisole/camisole/__main__.py", line 16, in extract_fail_message
return '\n'.join((relevant['meta']['message'], relevant['stderr']))
TypeError: sequence item 0: expected str instance, NoneType found
The traceback doesn't happen with -vvv:
{'compile': {'exitcode': 0,
'meta': {'cg-mem': 39316,
'csw-forced': 58,
'csw-voluntary': 13,
'exitcode': 0,
'exitsig': None,
'killed': False,
'max-rss': 79812,
'message': None,
'status': 'OK',
'time': 0.179,
'time-wall': 1.444},
'stderr': '',
'stdout': ''},
'tests': [{'exitcode': 0,
'meta': {'cg-mem': 4344,
'csw-forced': 3,
'csw-voluntary': 3,
'exitcode': 0,
'exitsig': None,
'killed': False,
'max-rss': 6260,
'message': None,
'status': 'OK',
'time': 0.0,
'time-wall': 0.054},
'name': 'test000',
'stderr': '',
'stdout': 'Hello, world!\n'}]}
Originally posted 2016-12-18 19:01 by Zopieux on Bitbucket
Originally posted 2016-12-18 19:02 by Zopieux on Bitbucket
# Todo: requires two compilers (bf and C++), no idea how to do
Please add support for the D Programming Language.
https://dlang.org/
Originally posted 2017-01-10 18:59 by serialk on Bitbucket
I would like to be able to add a "variant" attribute to languages.
Examples of variants I can think of:
The problem I see with this approach is that we're giving more flexibility to the users but we're complexifying too much everything: if you want to use different versions of different languages, you'll have to add different paths, different packages, and this won't fit in the easy approach "everything is packaged, we just pacman -S everything and call the binaries from the paths". We'll have to add configuration for the paths of the binaries, the language description will leak in the configuration and it might become a problem.
The other option is to keep everything as part of the name. We have Python and C++, and if someone wants to add a fancy compiler he can add a 'c++14-clang' language.
Design comments on this are welcome!
Originally posted 2017-02-13 20:32 by serialk on Bitbucket
Originally posted 2017-01-10 18:03 by serialk on Bitbucket
Originally posted 2016-12-20 13:45 by Zopieux on Bitbucket
Originally posted 2017-01-10 18:01 by serialk on Bitbucket
We should source python files in paths like:
/usr/share/camisole/lang
~/.local/share/camisole/lang
Maybe split, one file per language?
Configuration file to know which languages we want to enable? /etc/camisole.conf
? -c
option?
Go compiler throwing this error when trying to compile.
build cache is disabled by GOCACHE=off, but required as of Go 1.12
Setting the environment variable GOCACHE to /tmp/something
could be a workaround but it turns out that it raises a PermissionDenied exception in camisole during post-compile root_tmp cleanup
Originally posted 2017-01-10 18:16 by serialk on Bitbucket
This can cause big security issues because of the way we assign UID to the sandboxes.
Hi !
I'm using Camisole for a project, but I have a problem.
When I want to run a test with a huge entry (over than 1Mb), the exception "aiohttp.web_exceptions.HTTPRequestEntityTooLarge: Request Entity Too Large" is thrown.
Have you an idea how I can increase this size limit?
Thank you !
memory / virtual-memory?
Originally posted 2017-01-10 18:39 by serialk on Bitbucket
Assume an empty json input by default
Originally posted 2016-12-18 19:01 by Zopieux on Bitbucket
Just for you to know it works (but only in --privileged mode due to cgroup handling, maybe the right --cap-add might do the trick) :
https://github.com/Kochise/docker-camisole
Regards.
https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities
Originally posted 2017-01-11 17:41 by serialk on Bitbucket
Hi,
I have a new problem.
Up to now, Camisole was set up on a personal Raspberry Pi with Archlinux in order to show the feasibility of using Camisole in a formal academical usage.
However, when I moved the configuration to the "real machine", a VM provided by the university with Debian 9 OS, Java stopped being supported.
When I try camisole test -v
, I have the following error :
execve("/usr/bin/javac") : No such file or directory.
Of course, javac does exist in /usr/bin/ and does work adequately outside Camisole.
Any idea why Camisole can't find it?
Java is provided by the openjdk-8-jdk package (I'm not really proficient with Debian, so perhaps I'm missing something).
Thank you for you help,
Lastdreamer
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.