Coder Social home page Coder Social logo

Comments (10)

mmacfadden avatar mmacfadden commented on July 20, 2024

Seeing this same issue.

from lemur-docker.

kevgliss avatar kevgliss commented on July 20, 2024

Lemur no longer supports python2.7. I will make a note to update readme.

from lemur-docker.

kevgliss avatar kevgliss commented on July 20, 2024

Actually, I may have misread this issue. But I'm still not sure this is something that this project can fix... if you can't install node from the ubuntu packages. There's not too much we can do about it.

Can you install apt-get -y install nodejs make on a normal ubuntu image? Is this related to #22 and we aren't on the LTS version of ubuntu? Does apt-get -y install nodejs make on the ubuntu LTS?

from lemur-docker.

mmacfadden avatar mmacfadden commented on July 20, 2024

Isn't this happening INSIDE the docker build process. Meaning that these steps are occurring when the docker image is building. Therefore the host OS, meaning the the machine that is building this image via docker compose, has no control over this. If there is an unsupported python version, wouldn't that be the python version inside the docker image that is being built?

The Dockerfile is doing this:

RUN apt-get update && \
  apt-get -y install software-properties-common && \
  add-apt-repository -y ppa:jonathonf/python-3.5

RUN apt-get update && \
  apt-get install -y curl python3.5-dev git sudo libpq-dev libffi-dev \
    python3-psycopg2 postgresql-client-9.3 postgresql-contrib-9.3 && \
  update-alternatives --install /usr/bin/python python /usr/bin/python3.5 1

It seems like this step is somehow failing. as we see the following in the log.

npacking python2.7 (2.7.6-8ubuntu0.4) ...
Selecting previously unselected package python.
Preparing to unpack .../python_2.7.5-5ubuntu3_amd64.deb ...
update-alternatives: warning: forcing reinstallation of alternative /usr/bin/python3.5 because link group python is broken
Unpacking python (2.7.5-5ubuntu3) ...

from lemur-docker.

CircleCode avatar CircleCode commented on July 20, 2024

@kevgliss as pointed by @mmacfadden (I may have lack some explanations in my issue), the problem is that somewhere during the build process, nodejs requires python 2.7…
I don't know why, and do not have a way to test this right now, but you may be right when you suggest this is related to the old ubuntu version of this image…

from lemur-docker.

CircleCode avatar CircleCode commented on July 20, 2024

For information, I quickly tried to build this same image (with small adaptations) with ubuntu 16.04 as a base, and the same errors occurs.
it seems this is the use of https://deb.nodesource.com/setup_4.x which add a repo where nodejs depends on python 2.7 (don't ask me why nodejs would require any version of python…)
Maybe the solution would be to use a more recent version of nodejs?
@kevgliss which nodejs versions are supported?

from lemur-docker.

CircleCode avatar CircleCode commented on July 20, 2024

to continue in tests, I have successfully installed on an ubuntu 16.04 with this Dockerfile, but then the application does not work for me (js errors in the console)

Dockerfile:

# Copyright 2014 Netflix, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

FROM ubuntu:16.04
MAINTAINER Netflix Open Source Development <[email protected]>

RUN apt-get update && \
  apt-get install -y curl git build-essential sudo \
    python3 python3-pip python3-dev \
    nodejs npm \
    postgresql postgresql-contrib \
    libpq-dev libssl-dev libffi-dev libsasl2-dev libldap2-dev && \
  update-alternatives --install /usr/bin/python python /usr/bin/python3 1 && \
  update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1 && \
  update-alternatives --install /usr/bin/node node /usr/bin/nodejs 1 && \
  apt-get clean -y && \
  rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN locale-gen en_US.UTF-8

ENV LC_ALL=en_US.UTF-8

ENV LEMUR_VERSION=0.5.1

# Install Lemur
RUN git config --global url."https://".insteadOf git:// &&\
  cd /usr/local/src &&\
  git clone https://github.com/netflix/lemur.git &&\
  cd lemur &&\
  git fetch &&\
  pip install --upgrade virtualenv &&\
  virtualenv venv &&\
  export PATH=/usr/local/src/lemur/venv/bin:${PATH} &&\
  pip install --upgrade pip virtualenv &&\
  git checkout ${LEMUR_VERSION} &&\
  make develop

WORKDIR /usr/local/src/lemur

# Create static files
RUN npm install --unsafe-perm && node_modules/.bin/gulp build && \
  node_modules/.bin/gulp package && \
  rm -r bower_components node_modules

ADD lemur.conf.py /usr/local/src/lemur/lemur.conf.py
ADD api-start.sh /usr/local/src/lemur/scripts/api-start.sh
RUN chmod +x /usr/local/src/lemur/scripts/api-start.sh

CMD ["/usr/local/src/lemur/scripts/api-start.sh"]

Errors:

ReferenceError: require is not defined - vendor.js:80273:1
Error: [$injector:modulerr] Failed to instantiate module lemur due to:
[$injector:modulerr] Failed to instantiate module chart.js due to:
[$injector:nomod] Module 'chart.js' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
http://errors.angularjs.org/1.4.9/$injector/nomod?p0=chart.js
minErr/<@https://localhost/scripts/vendor.js:17042:12
module/<@https://localhost/scripts/vendor.js:18980:17
ensure@https://localhost/scripts/vendor.js:18904:38
module@https://localhost/scripts/vendor.js:18978:14
loadModules/<@https://localhost/scripts/vendor.js:21421:22
forEach@https://localhost/scripts/vendor.js:17315:11
loadModules@https://localhost/scripts/vendor.js:21405:5
loadModules/<@https://localhost/scripts/vendor.js:21422:40
forEach@https://localhost/scripts/vendor.js:17315:11
loadModules@https://localhost/scripts/vendor.js:21405:5
createInjector@https://localhost/scripts/vendor.j… vendor.js:29696:18

from lemur-docker.

kevgliss avatar kevgliss commented on July 20, 2024

@CircleCode It looks like your solution did work the error with chart.js is being discussed in
Netflix/lemur#996

from lemur-docker.

kevgliss avatar kevgliss commented on July 20, 2024

@CircleCode would you mind submitting a PR with the updated Ubuntu?

from lemur-docker.

CircleCode avatar CircleCode commented on July 20, 2024

@kevgliss need a little rework, and I will submit it in the coming days (it has been written as a POC :-) )

from lemur-docker.

Related Issues (20)

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.