ninjaclasher / dmoj-docker Goto Github PK
View Code? Open in Web Editor NEWDocker setup for the DMOJ: Modern Online Judge site.
Docker setup for the DMOJ: Modern Online Judge site.
Hi,
I just follow instruction and running up a site, but not have a judge available.
I try run judge-server repo to connect but not work.
Could you please help?
Hello,
First of all, thank you for starting this project. I'm using these docker configuration for my project, and it is much more convenient to deply online judge frontend.
I found an error while generating the schema for the DB by /dmoj/scripts/migrate
.
migrate
fails with ImportError
While executing migrate
, it fails with ImportError: cannot import name 'Literal' from 'typing' (/usr/lib/python3.7/typing.py)
. I googled it, and found that Python 3.7, which is installed by apt-get install python3
, doesn't support type hinting by default.
Traceback (most recent call last):
File "manage.py", line 17, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.7/dist-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.7/dist-packages/django/core/management/__init__.py", line 357, in execute
django.setup()
File "/usr/local/lib/python3.7/dist-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/local/lib/python3.7/dist-packages/django/apps/registry.py", line 114, in populate
app_config.import_models()
File "/usr/local/lib/python3.7/dist-packages/django/apps/config.py", line 211, in import_models
self.models_module = import_module(models_module_name)
File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/site/judge/models/__init__.py", line 4, in <module>
from judge.models.comment import Comment, CommentLock, CommentVote
File "/site/judge/models/comment.py", line 16, in <module>
from judge.models.contest import Contest
File "/site/judge/models/contest.py", line 14, in <module>
from judge.models.problem import Problem
File "/site/judge/models/problem.py", line 18, in <module>
from judge.models.profile import Organization, Profile
File "/site/judge/models/profile.py", line 9, in <module>
import webauthn
File "/usr/local/lib/python3.7/dist-packages/webauthn/__init__.py", line 1, in <module>
from .registration.generate_registration_options import generate_registration_options
File "/usr/local/lib/python3.7/dist-packages/webauthn/registration/generate_registration_options.py", line 3, in <module>
from webauthn.helpers import generate_challenge
File "/usr/local/lib/python3.7/dist-packages/webauthn/helpers/__init__.py", line 11, in <module>
from .options_to_json import options_to_json # noqa: F401
File "/usr/local/lib/python3.7/dist-packages/webauthn/helpers/options_to_json.py", line 3, in <module>
from .structs import (
File "/usr/local/lib/python3.7/dist-packages/webauthn/helpers/structs.py", line 2, in <module>
from typing import List, Literal, Optional
ImportError: cannot import name 'Literal' from 'typing' (/usr/lib/python3.7/typing.py)
How about changing the image of base
from debian:buster-slim
to python:3.8-slim-buster
?
Hi!
This is an excellent wrapper for the site and I'm surprised that they haven't yet asked you to have this as their official docker image.
I am having an issue though while trying to have judge and site on two different servers. I can successfully connect them but immediately after connection, the judge raises this error:
ERROR 2021-05-30 08:36:21,958 53 monitor Failed to start problem monitor.
Traceback (most recent call last):
File "/judge/dmoj/monitor.py", line 97, in start
self._monitor.start()
File "/usr/local/lib/python3.9/dist-packages/watchdog/observers/api.py", line 256, in start
emitter.start()
File "/usr/local/lib/python3.9/dist-packages/watchdog/utils/__init__.py", line 93, in start
self.on_thread_start()
File "/usr/local/lib/python3.9/dist-packages/watchdog/observers/inotify.py", line 118, in on_thread_start
self._inotify = InotifyBuffer(path, self.watch.is_recursive)
File "/usr/local/lib/python3.9/dist-packages/watchdog/observers/inotify_buffer.py", line 35, in __init__
self._inotify = Inotify(path, recursive)
File "/usr/local/lib/python3.9/dist-packages/watchdog/observers/inotify_c.py", line 169, in __init__
self._add_watch(path, event_mask)
File "/usr/local/lib/python3.9/dist-packages/watchdog/observers/inotify_c.py", line 385, in _add_watch
Inotify._raise_error()
File "/usr/local/lib/python3.9/dist-packages/watchdog/observers/inotify_c.py", line 405, in _raise_error
raise OSError(err, os.strerror(err))
FileNotFoundError: [Errno 2] No such file or directory
Warning: failed to start problem monitor!
I am not quite sure what is causing this but my guess was that some directories in docker-compose are not binded correctly. My first guess was binding ./problems
to /mnt/problems
instead of /problems
on the bridged service in compose but that didn't help.
What I can figure from the error message is that it's trying to look up /mnt/problems on the site server to update them on the judge server whenever they are changed through UI. So it has a right to complain about it not being available because we have dockerized that part and none of the compose services use that directory. But I'm not sure which one I should change to do so. Would you be able to help with this?
Thank you : )
Hi,
Excellent job packing everything into Docker images and working with Docker-Compose. I'm having trouble connecting the version of the judge created with Docker and the site. What should be the values for the environment variable according to the documentation?
<>
https://docs.dmoj.ca/#/judge/setting_up_a_judge
docker run \ --name judge \ -p "$(ip addr show dev enp1s0 | perl -ne 'm@inet (.*)/.*@ and print$1 and exit')":9998:9998 \ -v /mnt/problems:/problems \ --cap-add=SYS_PTRACE \ -d \ --restart=always \ dmoj/judge-tier1:latest \ run -p "$PORT" -c /problems/judge.yml \ "$IP" "$JUDGE_NAME" "$JUDGE_AUTHENTICATION_KEY"
Environment variable:
Thanks for your help
Hi,
I'm having issues when I try to set up my judge and connect it to the DMOJ site. I'm following instructions at https://docs.dmoj.ca/#/judge/setting_up_a_judge but my judge is not able to connect to the DMOJ site that I have set up with your docker image using docker-compose.
When I try to execute the judge as described here it is not able to connect to the bridged address. I have done all these:
judge.yml
file with the judge id, key, path to the problems folder and runtime.dmoj -c judge.yml "$IP"
(my PORT is 9999 as I've not changed it) and I've tried with the following $IP values:BRIDGED_JUDGE_ADDRESS
at settings.py
in the repo
folder.I also have set up 10.0.2.15
as my HOST value at site.env
and as server_name
at nginx.conf
.
I guess the problem is that my judge cannot connect to the bridged
container but I actually don't know how to make it work.
Any help is really appreciated.
Thank you very much in advance.
Thank you for providing a Docker Compose version for effortless deployment. However, I am currently facing difficulties in deploying a remote judge. Despite my efforts to search for similar issues, I have been unable to find any. Therefore, I have created this issue to request your assistance.
I am using your docker-compose version to deploy the site and set up a docker version of judge on the same machine following the document of DMOJ at https://docs.dmoj.ca/#/judge/setting_up_a_judge and it works well by this command.
docker run --name "<judge_local>" \
-v <site_problem_path>:/problems \
--cap-add=SYS_PTRACE -d --restart=always \
dmoj/judge-tier3:latest \
run -p "9999" "localhost" "<judge1_id_here>" "<judge1_key_here>"
Because I run on the same machine with the site
, so bridged address is localhost:9999
. All my problems are manual manage by the judge.
--
For remote judging, I follow these steps:
sshfs
to mount problems dir to the remote judgingsshfs -p 22 ubuntu@<site-public-ip>:<site_problem_path> <remote_judge_problems_path> -o ro
<site-public-ip>
docker run --name "<judge_remote>" \
-v <remote_judge_problems_path>:/problems \
--cap-add=SYS_PTRACE -d --restart=always \
dmoj/judge-tier3:latest \
run -p "9999" "<site-public-ip>" "<judge2_id_here>" "<judge2_key_here>"
The site /status/
show my new remote judge is online, and the docker logs <judge_remote>
does not show any error.
/home/judge/.profile: line 31: /root/.cargo/env: No such file or directory
('0.0.0.0', 15001)
Self-testing executors
Self-testing ADA: Success [0.002s, 2584 KB] gnatmake 12.2.0
Self-testing AWK: Success [0.003s, 1384 KB] awk 1.3.4
Self-testing BF: Success [0.002s, 984 KB] opt 14.0.6, llc 14.0.6, ld_x64 2.40
Self-testing C: Success [0.002s, 988 KB] gcc 12
...
Self-testing TEXT: Success [0.002s, 1640 KB] cat 9.1
ERROR: ld.so: object '/tmp/tmpaesp1_w0/setbufsize.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
Self-testing TUR: Success [0.002s, 2808 KB] tprolog
Self-testing V8JS: Success [0.004s, 10900 KB] v8dmoj 9.3.345.19
Self-testing ZIG: Success [0.002s, 4 KB] zig 0.6.0
Running live judge...
INFO 2023-07-20 09:01:48,936 20 packet Preparing to connect to [<site-public-ip>]:9999 as: <judge2_id_here>
INFO 2023-07-20 09:01:48,936 20 packet TLS not enabled.
INFO 2023-07-20 09:01:48,939 20 packet Opening connection to: [<site-public-ip>]:9999
INFO 2023-07-20 09:01:48,943 20 packet Starting handshake with: [<site-public-ip>]:9999
INFO 2023-07-20 09:01:48,944 20 packet Awaiting handshake response: [<site-public-ip>]:9999
INFO 2023-07-20 09:01:48,957 20 packet Judge "<judge2_id_here>" online: [<site-public-ip>]:9999
<end of file>
The bridged container doesn't show any log, the site shows remote judge is online, but no problem allows using the new judge even after restarting all containers.
Hi all. I view pdf fail : Failed to load PDF document.
Log of pdfoid container:
Traceback (most recent call last):
File "/pdfoid/pdfoid/server.py", line 45, in post
result = yield self.backend.render(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/tornado/gen.py", line 767, in run
value = future.result()
^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/tornado/gen.py", line 780, in run
yielded = self.gen.throw(exc)
^^^^^^^^^^^^^^^^^^^
File "/pdfoid/pdfoid/backends/direct.py", line 28, in render
result = yield worker.render(
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/tornado/gen.py", line 767, in run
value = future.result()
^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/tornado/gen.py", line 780, in run
yielded = self.gen.throw(exc)
^^^^^^^^^^^^^^^^^^^
File "/pdfoid/pdfoid/backends/direct.py", line 63, in render
yield self.html_to_pdf(
File "/usr/local/lib/python3.11/site-packages/tornado/gen.py", line 767, in run
value = future.result()
^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/tornado/gen.py", line 216, in wrapper
result = ctx_run(func, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/pdfoid/pdfoid/backends/direct.py", line 82, in html_to_pdf
options.binary_location = self.backend.chrome_path
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/selenium/webdriver/chromium/options.py", line 53, in binary_location
raise TypeError(self.BINARY_LOCATION_ERROR)
TypeError: Binary Location Must be a String
Help Me. Thanks
I have follow this documentation the installation part work properly but I'm unable to submit the code due to No Judge
issue.
Then I have create new judge
but by default is disabled.
How do we create judge to submit the problem.
Thanks
Hello,
First of all, thank you for starting this project. I'm using these docker configuration for my project, and it is much more convenient to deply online judge frontend.
I found an error while building images by docker-compose build
.
Fail to build wheel for pillow.
While building an image of base
, it fails to build wheel for pillow
. It is because starting with Pillow 3.0.0, libjpeg
package is required by default.
Failed building wheel for pillow
Running setup.py clean for pillow
Running setup.py bdist_wheel for cbor2: started
Running setup.py bdist_wheel for cbor2: finished with status 'done'
Stored in directory: /root/.cache/pip/wheels/16/83/32/c08bf896e5c66b2323795cc4729dd5de542e590e5667411e0d
Successfully built django-pagedown django-sortedm2m django-impersonate dmoj-wpadmin llist django-fernet-fields qrcode ansi2html martor rcssmin cbor2
Failed to build pillow
webauthn 1.0.0 has requirement cryptography>=3.4.7, but you'll have cryptography 2.6.1 which is incompatible.
Installing collected packages: Django, rcssmin, rjsmin, django-appconf, django-compressor, django-js-asset, django-mptt, django-pagedown, django-registration-redux, django-reversion, django-social-share, django-sortedm2m, django-impersonate, dmoj-wpadmin, lxml, Pygments, mistune, defusedxml, oauthlib, PyJWT, charset-normalizer, requests, requests-oauthlib, python3-openid, social-auth-core, social-auth-app-django, django-statici18n, pika, ua-parser, pyyaml, MarkupSafe, jinja2, django-jinja, llist, django-fernet-fields, pyotp, pillow, qrcode, jsonfield, pymoss, pyparsing, packaging, vine, click, billiard, wcwidth, prompt-toolkit, click-repl, amqp, cached-property, zipp, importlib-metadata, kombu, click-didyoumean, click-plugins, celery, ansi2html, lupa, Markdown, martor, netaddr, cbor2, pydantic, webauthn, webencodings, bleach, django-admin-sortable2
Found existing installation: Django 3.2.8
Uninstalling Django-3.2.8:
Successfully uninstalled Django-3.2.8
Running setup.py install for pillow: started
Running setup.py install for pillow: finished with status 'error'
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-01ducn4c/pillow/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-xfi159k0/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/PIL
copying src/PIL/BufrStubImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/__init__.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/McIdasImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/ImageOps.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/IptcImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/ImagePath.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/GribStubImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/ImageStat.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/ImageColor.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/ImageMorph.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/ImageTk.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/ExifTags.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/FitsStubImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/TiffImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/PalmImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/GimpPaletteFile.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/_version.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/CurImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/ContainerIO.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/ImageMath.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/ImageChops.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/Hdf5StubImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/JpegImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/WalImageFile.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/PdfImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/Image.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/ImageSequence.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/PsdImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/MpoImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/PaletteFile.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/XbmImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/BmpImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/ImageDraw2.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/TgaImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/PcfFontFile.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/_util.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/PcxImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/WmfImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/ImageGrab.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/ImtImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/TiffTags.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/Jpeg2KImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/FliImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/PyAccess.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/DcxImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/WebPImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/BlpImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/ImagePalette.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/BdfFontFile.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/MpegImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/ImageQt.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/ImageEnhance.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/GdImageFile.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/TarIO.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/ImImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/features.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/ImageShow.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/GbrImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/MspImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/PngImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/FtexImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/JpegPresets.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/FontFile.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/PdfParser.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/__main__.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/SunImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/GifImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/ImageFilter.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/SpiderImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/ImageMode.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/GimpGradientFile.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/PixarImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/ImageTransform.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/ImageFont.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/XVThumbImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/SgiImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/PcdImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/ImageFile.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/PpmImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/DdsImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/IcnsImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/ImageWin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/IcoImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/ImageDraw.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/MicImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/ImageCms.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/_tkinter_finder.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/PSDraw.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/EpsImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/_binary.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/FpxImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
copying src/PIL/XpmImagePlugin.py -> build/lib.linux-x86_64-3.7/PIL
running egg_info
writing src/Pillow.egg-info/PKG-INFO
writing dependency_links to src/Pillow.egg-info/dependency_links.txt
writing top-level names to src/Pillow.egg-info/top_level.txt
reading manifest file 'src/Pillow.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.c'
warning: no files found matching '*.h'
warning: no files found matching '*.sh'
warning: no previously-included files found matching '.appveyor.yml'
warning: no previously-included files found matching '.clang-format'
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.editorconfig'
warning: no previously-included files found matching '.readthedocs.yml'
warning: no previously-included files found matching 'codecov.yml'
warning: no previously-included files matching '.git*' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
no previously-included directories found matching '.ci'
writing manifest file 'src/Pillow.egg-info/SOURCES.txt'
running build_ext
The headers or library files could not be found for jpeg,
a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
Traceback (most recent call last):
File "/tmp/pip-install-01ducn4c/pillow/setup.py", line 1024, in <module>
zip_safe=not (debug_build() or PLATFORM_MINGW),
File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/usr/lib/python3.7/distutils/command/install.py", line 589, in run
self.run_command('build')
File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/lib/python3.7/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/lib/python3/dist-packages/setuptools/command/build_ext.py", line 78, in run
_build_ext.run(self)
File "/usr/lib/python3.7/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/tmp/pip-install-01ducn4c/pillow/setup.py", line 790, in build_extensions
raise RequiredDependencyException(f)
__main__.RequiredDependencyException: jpeg
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-01ducn4c/pillow/setup.py", line 1037, in <module>
raise RequiredDependencyException(msg)
__main__.RequiredDependencyException:
The headers or library files could not be found for jpeg,
a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-01ducn4c/pillow/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-xfi159k0/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-01ducn4c/pillow/
The command '/bin/sh -c pip3 install -r requirements.txt' returned a non-zero code: 1
ERROR: Service 'base' failed to build : Build failed
By adding libjpeg-dev
in /dmoj/base/Dockerfile
, the error above doesn't occur. How about add one in /dmoj/base/Dockerfile
?
i run in this error when installing at the "migrate" stage :
File "/usr/local/lib/python3.11/site-packages/lxml/html/clean.py", line 18, in
raise ImportError(
ImportError: lxml.html.clean module is now a separate project lxml_html_clean.
Install lxml[html_clean] or lxml_html_clean directly.
i bash into the container and install lxml_html_clean, then it work.
Hi,
When attempting to connect to the site, Firefox/wget/curl return a 400 bad request error. A wget inside the nginx container also returns 400, so I don't think it's a problem with my external config. The favicon still appears, though.
Any ideas on what might be causing this issue?
docker-compose logs:
Creating network "dmoj_db" with the default driver
Creating network "dmoj_site" with the default driver
Creating network "dmoj_nginx" with the default driver
Creating dmoj_mathoid_1 ... done
Creating dmoj_mysql ... done
Creating dmoj_base_1 ... done
Creating dmoj_redis ... done
Creating dmoj_texoid_1 ... done
Creating dmoj_wsevent_1 ... done
Creating dmoj_celery_1 ... done
Creating dmoj_bridged_1 ... done
Creating dmoj_site_1 ... done
Creating dmoj_nginx ... done
Attaching to dmoj_base_1, dmoj_mysql, dmoj_redis, dmoj_mathoid_1, dmoj_texoid_1, dmoj_wsevent_1, dmoj_celery_1, dmoj_site_1, dmoj_bridged_1, dmoj_nginx
dmoj_mysql | 2021-06-23 14:44:03+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.5.10+maria~focal started.
dmoj_mysql | 2021-06-23 14:44:06+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
dmoj_mysql | 2021-06-23 14:44:06+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.5.10+maria~focal started.
dmoj_mysql | 2021-06-23 14:44:06 0 [Note] mysqld (mysqld 10.5.10-MariaDB-1:10.5.10+maria~focal) starting as process 1 ...
dmoj_mysql | 2021-06-23 14:44:06 0 [Note] InnoDB: Uses event mutexes
dmoj_mysql | 2021-06-23 14:44:06 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
dmoj_mysql | 2021-06-23 14:44:06 0 [Note] InnoDB: Number of pools: 1
dmoj_mysql | 2021-06-23 14:44:06 0 [Note] InnoDB: Using generic crc32 instructions
dmoj_mysql | 2021-06-23 14:44:06 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
dmoj_mysql | 2021-06-23 14:44:06 0 [Note] InnoDB: Using Linux native AIO
dmoj_mysql | 2021-06-23 14:44:06 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
dmoj_mysql | 2021-06-23 14:44:06 0 [Note] InnoDB: Completed initialization of buffer pool
dmoj_mysql | 2021-06-23 14:44:07 0 [Note] InnoDB: 128 rollback segments are active.
dmoj_mysql | 2021-06-23 14:44:07 0 [Note] InnoDB: Creating shared tablespace for temporary tables
dmoj_mysql | 2021-06-23 14:44:07 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
dmoj_mysql | 2021-06-23 14:44:07 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
dmoj_mysql | 2021-06-23 14:44:07 0 [Note] InnoDB: 10.5.10 started; log sequence number 4727994; transaction id 5777
dmoj_mysql | 2021-06-23 14:44:07 0 [Note] Plugin 'FEEDBACK' is disabled.
dmoj_mysql | 2021-06-23 14:44:07 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
dmoj_mysql | 2021-06-23 14:44:07 0 [Note] InnoDB: Buffer pool(s) load completed at 210623 14:44:07
dmoj_mysql | 2021-06-23 14:44:07 0 [Note] Server socket created on IP: '::'.
dmoj_mysql | 2021-06-23 14:44:07 0 [Warning] 'proxies_priv' entry '@% root@e55f303591a0' ignored in --skip-name-resolve mode.
dmoj_mysql | 2021-06-23 14:44:08 0 [Note] Reading of all Master_info entries succeeded
dmoj_mysql | 2021-06-23 14:44:08 0 [Note] Added new Master_info '' to hash table
dmoj_mysql | 2021-06-23 14:44:08 0 [Note] mysqld: ready for connections.
dmoj_mysql | Version: '10.5.10-MariaDB-1:10.5.10+maria~focal' socket: '/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution
redis_1 | 1:C 23 Jun 2021 14:44:03.560 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis_1 | 1:C 23 Jun 2021 14:44:03.560 # Redis version=6.2.4, bits=64, commit=00000000, modified=0, pid=1, just started
redis_1 | 1:C 23 Jun 2021 14:44:03.560 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
redis_1 | 1:M 23 Jun 2021 14:44:03.561 * monotonic clock: POSIX clock_gettime
redis_1 | 1:M 23 Jun 2021 14:44:03.562 * Running mode=standalone, port=6379.
redis_1 | 1:M 23 Jun 2021 14:44:03.562 # Server initialized
redis_1 | 1:M 23 Jun 2021 14:44:03.562 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redis_1 | 1:M 23 Jun 2021 14:44:03.562 * Ready to accept connections
nginx_1 | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
nginx_1 | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
dmoj_base_1 exited with code 0
nginx_1 | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
nginx_1 | 10-listen-on-ipv6-by-default.sh: info: /etc/nginx/conf.d/default.conf is not a file or does not exist
nginx_1 | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
nginx_1 | /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
nginx_1 | /docker-entrypoint.sh: Configuration complete; ready for start up
nginx_1 | 2021/06/23 14:44:33 [notice] 1#1: using the "epoll" event method
nginx_1 | 2021/06/23 14:44:33 [notice] 1#1: nginx/1.21.0
nginx_1 | 2021/06/23 14:44:33 [notice] 1#1: built by gcc 10.2.1 20201203 (Alpine 10.2.1_pre1)
nginx_1 | 2021/06/23 14:44:33 [notice] 1#1: OS: Linux 5.12.9-arch1-1
nginx_1 | 2021/06/23 14:44:33 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
nginx_1 | 2021/06/23 14:44:33 [notice] 1#1: start worker processes
nginx_1 | 2021/06/23 14:44:33 [notice] 1#1: start worker process 22
nginx_1 | 2021/06/23 14:44:33 [notice] 1#1: start worker process 23
mathoid_1 | {"name":"service-runner","hostname":"7bbf7081ecbf","pid":8,"level":50,"levelPath":"error/metrics","msg":"No such metrics client: 'undefined'","time":"2021-06-23T14:44:40.668Z","v":0}
mathoid_1 | {"name":"mathoid","hostname":"7bbf7081ecbf","pid":8,"level":30,"levelPath":"info","msg":"Worker 8 listening on mathoid:10044","time":"2021-06-23T14:45:01.246Z","v":0}
nginx_1 | 2021/06/23 14:50:58 [notice] 1#1: signal 2 (SIGINT) received, exiting
nginx_1 | 2021/06/23 14:50:58 [notice] 23#23: exiting
nginx_1 | 2021/06/23 14:50:58 [notice] 22#22: exiting
nginx_1 | 2021/06/23 14:50:58 [notice] 23#23: exit
nginx_1 | 2021/06/23 14:50:58 [notice] 22#22: exit
nginx_1 | 2021/06/23 14:50:58 [notice] 1#1: signal 17 (SIGCHLD) received from 22
nginx_1 | 2021/06/23 14:50:58 [notice] 1#1: worker process 22 exited with code 0
nginx_1 | 2021/06/23 14:50:58 [notice] 1#1: signal 29 (SIGIO) received
nginx_1 | 2021/06/23 14:50:58 [notice] 1#1: signal 17 (SIGCHLD) received from 23
nginx_1 | 2021/06/23 14:50:58 [notice] 1#1: worker process 23 exited with code 0
nginx_1 | 2021/06/23 14:50:58 [notice] 1#1: exit
nginx_1 | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
nginx_1 | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
nginx_1 | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
nginx_1 | 10-listen-on-ipv6-by-default.sh: info: /etc/nginx/conf.d/default.conf is not a file or does not exist
nginx_1 | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
nginx_1 | /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
nginx_1 | /docker-entrypoint.sh: Configuration complete; ready for start up
nginx_1 | 2021/06/23 14:51:01 [notice] 1#1: using the "epoll" event method
nginx_1 | 2021/06/23 14:51:01 [notice] 1#1: nginx/1.21.0
nginx_1 | 2021/06/23 14:51:01 [notice] 1#1: built by gcc 10.2.1 20201203 (Alpine 10.2.1_pre1)
nginx_1 | 2021/06/23 14:51:01 [notice] 1#1: OS: Linux 5.12.9-arch1-1
nginx_1 | 2021/06/23 14:51:01 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
nginx_1 | 2021/06/23 14:51:01 [notice] 1#1: start worker processes
nginx_1 | 2021/06/23 14:51:01 [notice] 1#1: start worker process 22
nginx_1 | 2021/06/23 14:51:01 [notice] 1#1: start worker process 23
I wasn't able to find the nginx access/error logs (they don't seem to appear in docker logs dmoj_nginx
).
Thanks in advance and for your work on the project!
Hello,
I've followed the steps in the README and when I try to open de site in my browser I get the following error message:
SIGSEGV: invalid_state
corrupt page /
site: fatal signal: Segmentation fault
site died (signal 500, exit -11)
panic: [go back](javascript:history.back())
Then, in the nginx error.log file there's this message:
2023/03/19 12:48:17 [error] 20#20: *1 directory index of "/assets/resources/icons/" is forbidden, client: 10.0.2.15, server: 10.0.2.15, request: "GET / HTTP/1.1", host: "10.0.2.15"
I'm not expert in nginx and I don't know Django. Please can you help me o guide me in order to solve this issue?
Thank you very much.
First of all thanks for providing this docker setup.
But, I am facing a lot of issues configuring the judge because I don't quite seem to understand the process and configurations like where is the problems folder I know it got created in domj-docker/dmoj/problems but even after importing sample problem as mentioned in readme,the folder is still empty even though the problem "AplusB" is on the webui.
so can you Please add a guide on how to configure judge server for this configuration(default mentioned in readME)?to make this a complete installation guide
i got an error during “docker-compose build”
could you please give me some help ^_^
OS:Window 10
Logs:
db uses an image, skipping
redis uses an image, skipping
nginx uses an image, skipping
Building texoid
Step 1/7 : FROM debian:buster-slim
---> 8e022c70c28b
Step 2/7 : RUN apt-get update && apt-get install -y --no-install-recommends texlive-binaries texlive-generic-extra texlive-generic-recommended texlive-latex-base texlive-latex-extra texlive-latex-recommended texlive-pictures texlive-pstricks librsvg2-bin xxd imagemagick python3-pip python3-dev python3-wheel python3-setuptools git && rm -rf /var/lib/apt/lists/*
---> Using cache
---> 30fcea03262d
Step 3/7 : RUN git clone https://github.com/DMOJ/texoid/
---> Using cache
---> 0f30149b624b
Step 4/7 : WORKDIR /texoid/
---> Using cache
---> 05620be323d0
Step 5/7 : RUN pip3 install -e .
---> Using cache
---> 82cb91858465
Step 6/7 : EXPOSE 8888
---> Using cache
---> 670d6949d8b8
Step 7/7 : ENTRYPOINT texoid --address=texoid --port=8888
---> Using cache
---> 162a4cee9443
Successfully built 162a4cee9443
Successfully tagged dmoj-site-texoid:latest
Building mathoid
Step 1/5 : FROM node:8.17.0
---> 8eeadf3757f4
Step 2/5 : RUN npm install mathoid && ln -sfv /node_modules/mathoid/app.js /node_modules/app.js
---> Using cache
---> 247fa0792f0b
Step 3/5 : EXPOSE 10044
---> Using cache
---> bf4ea0a5aa74
Step 4/5 : WORKDIR /node_modules/mathoid
---> Using cache
---> 341e6d1705dd
Step 5/5 : CMD /node_modules/mathoid/server.js
---> Using cache
---> 78018a54dc4f
Successfully built 78018a54dc4f
Successfully tagged dmoj-site-mathoid:latest
Building base
Step 1/6 : FROM debian:buster-slim
---> 8e022c70c28b
Step 2/6 : RUN apt-get update && apt-get install -y git gcc g++ make curl gettext wget libxml2-dev libxslt1-dev zlib1g-dev mariadb-client libmariadbclient-dev debconf-utils python3-pip python3-dev python3 && wget -q --no-check-certificate -O- https://bootstrap.pypa.io/get-pip.py | python3 && curl -sL https://deb.nodesource.com/setup_12.x | bash - && apt-get install -y nodejs && apt-get autoremove -y && rm -rf /var/lib/apt/lists/*
---> Using cache
---> 0591d18b715d
Step 3/6 : RUN npm install -g sass postcss-cli autoprefixer
---> Using cache
---> 50234f04c7dd
Step 4/6 : RUN pip install pymysql mysqlclient websocket-client uwsgi python-memcached redis
---> Using cache
---> 78455312a0ed
Step 5/6 : COPY repo/requirements.txt .
---> Using cache
---> 1c961493f805
Step 6/6 : RUN pip install -r requirements.txt
---> Using cache
---> 2dbd7f14e6f7
Successfully built 2dbd7f14e6f7
Successfully tagged dmoj-site-base:latest
Building static
Step 1/6 : FROM dmoj-site-base:latest
---> 2dbd7f14e6f7
Step 2/6 : COPY repo/ /site/
---> Using cache
---> 0583cef74d7d
Step 3/6 : WORKDIR /site/
---> Using cache
---> 5a004c582b1e
Step 4/6 : RUN mkdir /assets/
---> Using cache
---> 0d18f1c473dd
Step 5/6 : RUN bash make_style.sh && python3 manage.py collectstatic --noinput && python3 manage.py compilemessages && python3 manage.py compilejsi18n
---> Running in 363004f24e9c
make_style.sh: line 24: syntax error: unexpected end of file
ERROR: Service 'static' failed to build: The command '/bin/sh -c bash make_style.sh && python3 manage.py collectstatic --noinput && python3 manage.py compilemessages && python3 manage.py compilejsi18n' returned a non-zero code: 2
I have successfully installed the DMOJ website on ubuntu 20.04. However, the "View as PDF" function not working. I see the "View as PDF" button on-page, but it occurs an error when I click on it.
This is the error:
"SIGSEGV: invalid_state
corrupt page /problem/aplusb/pdf
site: fatal signal: Segmentation fault
site died (signal 500, exit -11)
panic: go back"
How can I resolve that error, please guide me? Thank you!
The script use docker compose V1 ( docker-compose).
The docker compose V2 use "docker compose".
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.