Giter Site home page Giter Site logo

ceodigvijay / api-base Goto Github PK

View Code? Open in Web Editor NEW

This project forked from judge0/compilers

0.0 0.0 0.0 428 KB

Docker image with installed compilers, interpreters and sandbox.

Home Page: https://hub.docker.com/r/judge0/api-base/

License: GNU General Public License v3.0

Dockerfile 24.47% Shell 39.59% Python 21.78% D 0.55% Elixir 0.20% Erlang 0.38% VBA 0.18% Pascal 0.80% C++ 1.34% C 1.07% Fortran 0.75% Haskell 0.79% Go 0.66% Prolog 0.49% Java 2.48% Julia 0.20% Kotlin 0.51% Lua 0.18% C# 1.38% Assembly 2.20%

api-base's Introduction

Judge0 API Base

License: GPL v3 Become a Patron Donate with PayPal

About

Judge0 API Base is an base API Docker image with installed compilers, interpreters and sandbox environment - isolate.

Compilers and Interpreters

Each compiler and interpreter is compiled during image build, or if precompiled binary was available for x86_64 architecture then this binary is used.

We used this approach of compiling each compiler and interpreter instead of installing available packages because we have full control of choosing where this compiler and interpreter will be installed. That also gives us ability to install some compilers and interpreters that are not available with package manager.

As a consequence, Judge0 API Base image is large and build time takes few hours, but we successfully installed many different compilers and interpreters and more of them can be added easily.

We are open to any suggestions on how to reduce size of this image but retain flexibility of adding/removing new compilers and interpreters.

Here is a list of supported languages:

# Name
1 Assembly (NASM 2.14.02)
2 Bash (5.0.0)
3 Basic (FBC 1.07.1)
4 C (GCC 7.4.0)
5 C++ (GCC 7.4.0)
6 C (GCC 8.3.0)
7 C++ (GCC 8.3.0)
8 C (GCC 9.2.0)
9 C++ (GCC 9.2.0)
10 C# (Mono 6.6.0.161)
11 Common Lisp (SBCL 2.0.0)
12 D (DMD 2.089.1)
13 Elixir (1.9.4)
14 Erlang (OTP 22.2)
15 Executable
16 Fortran (GFortran 9.2.0)
17 Go (1.13.5)
18 Haskell (GHC 8.8.1)
19 Java (OpenJDK 13.0.1)
20 JavaScript (Node.js 12.14.0)
21 Lua (5.3.5)
22 OCaml (4.09.0)
23 Octave (5.1.0)
24 Pascal (FPC 3.0.4)
25 PHP (7.4.1)
26 Plain Text
27 Prolog (GNU Prolog 1.4.5)
28 Python (2.7.17)
29 Python (3.8.1)
30 Ruby (2.7.0)
31 Rust (1.40.0)
32 TypeScript (3.7.4)

Sandbox Environment

Sandbox environment is also included in this image. For sandbox environment we are using isolate (licensed under GPL v2).

Isolate is a sandbox built to safely run untrusted executables, offering them a limited-access environment and preventing them from affecting the host system. It takes advantage of features specific to the Linux kernel, like namespaces and control groups.

Huge thanks to Martin Mareš and Bernard Blackham for developing and maintaining this project. Also, thanks to all other people who contributed to isolate project.

Isolate was used as sandbox environment (part of CMS system) on big programming contests like International Olympiad in Informatics (a.k.a. IOI) in 2012, and we trust that this sandbox environment works and does its job.

Building Docker Image

If you want to build your own Judge0 API Base image:

  1. Clone or download this project.
  2. Make changes if you want.
  3. Run docker build -t yourRepoName .
  4. Grab some coffee, this will take some time.

Pulling Docker Image

Take a look at Docker Hub. There are version tags and latest tag.

latest tag will always be equal to highest version tag. Dockerfiles for all versions will be available in tags or releases pages of GitHub.

To pull version 1.0.0:

  1. docker pull judge0/api-base:1.0.0
  2. Grab some coffee, this might take a while.

Adding New Compiler or Interpreter

Adding new compiler or interpreter is easy as long as you know how to compile it properly or as long as you know what precompiled binary you need to download.

You should add installation of your favorite compiler between installation of last compiler and isolate installation. Installation of isolate should always be the last, because it is then easier to rebuild image when new version of isolate is available.

You should also install your favorite compiler inside /usr/local/ folder. For example GCC 9.2.0 is installed inside /usr/local/gcc-9.2.0 folder.

Please note that when you add new compiler or interpreter there is still some work that needs to be done for it to be usable on Judge0 API, but adding it to Judge0 API Base image is the first step. After that read documentation of Judge0 API for the next steps.

Donate

Your are more than welcome to support Judge0 on Patreon or via PayPal. Your monthly or one-time donation will help pay server costs and will improve future development and maintenance. Thank you ♥

api-base's People

Contributors

hermanzdosilovic avatar ceodigvijay avatar alan-navarro96 avatar

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.