Skip to content
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

This version doesn't Support Python Libraries #470

Open
sagar-soulai opened this issue May 3, 2024 · 2 comments
Open

This version doesn't Support Python Libraries #470

sagar-soulai opened this issue May 3, 2024 · 2 comments

Comments

@sagar-soulai
Copy link

Hi,

This 1.13 version doesn't support python libraries, so I tried to make build locally with add python command in your Dockerfile and I am trying to deploy judge0 with python libraries using docker but facing issues. Can you please provide me proper documentation for judge0 with all the python libraries like all the steps for deploying this.

I am using this Dockerfile and I have added some command just after the base image

FROM judge0/compilers:1.4.0 AS production

RUN apt-get update &&
apt-get install -y software-properties-common &&
add-apt-repository ppa:deadsnakes/ppa &&
apt-get update &&
apt-get install -y python3.10 &&
apt-get install -y python3-pip

RUN python3.10 -m pip install --no-cache-dir
mlxtend
numpy==1.24.4
pandas==1.3.0
scikit-learn==1.4.2
pytest
scipy &&
rm -rf /var/lib/apt/lists/*

ENV JUDGE0_HOMEPAGE "https://judge0.com/"
LABEL homepage=$JUDGE0_HOMEPAGE

ENV JUDGE0_SOURCE_CODE "https://github.com/judge0/judge0"
LABEL source_code=$JUDGE0_SOURCE_CODE

ENV JUDGE0_MAINTAINER "Herman Zvonimir Došilović hermanz.dosilovic@gmail.com"
LABEL maintainer=$JUDGE0_MAINTAINER

ENV PATH "/usr/local/ruby-2.7.0/bin:/opt/.gem/bin:$PATH"
ENV GEM_HOME "/opt/.gem/"

RUN apt-get update &&
apt-get install -y --no-install-recommends
cron
libpq-dev
sudo &&
rm -rf /var/lib/apt/lists/* &&
echo "gem: --no-document" > /root/.gemrc &&
gem install bundler:2.1.4 &&
npm install -g --unsafe-perm aglio@2.3.0

EXPOSE 2358

WORKDIR /api

COPY Gemfile* ./
RUN RAILS_ENV=production bundle

COPY cron /etc/cron.d
RUN cat /etc/cron.d/* | crontab -

COPY . .

ENTRYPOINT ["/api/docker-entrypoint.sh"]
CMD ["/api/scripts/server"]

RUN useradd -u 1000 -m -r judge0 &&
echo "judge0 ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers &&
chown judge0: /api/tmp/

USER judge0

ENV JUDGE0_VERSION "1.13.1"
LABEL version=$JUDGE0_VERSION

FROM production AS development

CMD ["sleep", "infinity"]
Uploading Screenshot 2024-05-03 at 10.26.06 PM.png…

@sagar-soulai
Copy link
Author

i have tried with python3.7, 3.8 and 3.10 but nothing works

@jackrankin
Copy link

Same, I have tried everything including what is suggested in issue 232. Does it work with older versions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants