GithubHelp home page GithubHelp logo

iurii-vatazhyshyn / ui Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mlrun/ui

0.0 0.0 1.0 6.77 MB

UI of MLRun — Machine Learning automation and tracking

License: Apache License 2.0

JavaScript 77.18% Dockerfile 0.04% HTML 0.03% SCSS 5.70% Shell 0.07% Gherkin 16.44% Python 0.47% Groovy 0.06%

ui's Introduction

Production

npm run docker

Builds a production Docker image.

You can pass the following environment variables to control the resulting image name:

Name Description Default Example
MLRUN_DOCKER_REGISTRY sets the Docker registy (Dockerhub) quay.io/
MLRUN_DOCKER_REPO sets the Docker repository mlrun iguazio
MLRUN_DOCKER_TAG sets the Docker image tag latest 0.4.9, unstable

Note: the trailing forward-slash / in MLRUN_DOCKER_REGISTRY's value is significant.

Examples:

Command Resulting Docker image name
npm run docker mlrun/mlrun-ui:latest
MLRUN_DOCKER_REGISTRY=quay.io/ MLRUN_DOCKER_REPO=iguazio MLRUN_DOCKER_TAG=0.4.9 npm run docker quay.io/iguazio/mlrun-ui:0.4.9

docker run environment variables

The Docker container runs an Nginx server, which listens on exposed port number 80, serves the web-app, and proxies to the backend API.

You can pass the following environment variables to the docker run command to configure it:

Name Description
MLRUN_API_PROXY_URL Sets the base URL of the backend API
Default: http://localhost:80
Example: http://17.220.101.245:30080
MLRUN_NUCLIO_MODE Sets the MLRun Nuclio integration mode
Default: disabled
Example: enabled
MLRUN_NUCLIO_API_URL Sets the base URL of the Nuclio API
Default: http://localhost:8070
Example: http://17.220.101.245:30070
MLRUN_NUCLIO_UI_URL Sets the base URL of the Nuclio UI
Default: http://localhost:8070
Example: http://17.220.101.245:30070
MLRUN_V3IO_ACCESS_KEY Sets the V3IO access key to use for accessing V3IO containers
Example: a7097c94-6e8f-436d-9717-a84abe2861d1
MLRUN_FUNCTION_CATALOG_URL Sets the base URL of the function-template catalog
Default: https://raw.githubusercontent.com
MLRUN_FUNCTION_CATALOG_PATH Sets the base URI of the function-template catalog
Default: /mlrun/functions/master

Example:

docker run -it -d -p 4000:80 --rm --name mlrun-ui -e MLRUN_API_PROXY_URL=http://17.220.101.245:30080 -e MLRUN_NUCLIO_MODE=enabled -e MLRUN_NUCLIO_API_URL=http://17.220.101.245:30070 -e MLRUN_NUCLIO_UI_URL=http://17.220.101.245:30070 -e MLRUN_FUNCTION_CATALOG_URL=https://raw.githubusercontent.com -e MLRUN_FUNCTION_CATALOG_PATH=/mlrun/functions/master -e MLRUN_V3IO_ACCESS_KEY=a7097c94-6e8f-436d-9717-a84abe2861d1 quay.io/mlrun/mlrun-ui:0.4.9

Docker container contents

The files served by Nginx server are located at /usr/share/nginx/html and consist of:

  • The production deployment files coming from the build folder (created by the npm run build command in the Dockerflie).
  • BUILD_DATE: a file that contains the timestamp of running the npm run docker command, for example Wed Jun 17 15:43:16 UTC 2020.
    In case the Docker container is running and is named mlrun-ui, you can use the following command to print the build date:
    $ docker exec -ti mlrun-ui sh -c "cat /usr/share/nginx/html/BUILD_DATE"
    Wed Jun 17 15:43:16 UTC 2020
    
  • COMMIT_HASH: a file that contains the short git commit hash (for example: 703a554) of the commit that was at the HEAD when running the npm run docker command.
    In case the Docker container is running and is named mlrun-ui, you can use the following command to print the short git commit hash:
    $ docker exec -ti mlrun-ui sh -c "cat /usr/share/nginx/html/COMMIT_HASH"
    703a554
    

npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed.

This command is run by the Dockerfile that is used by the command npm run docker.

Note: npm install should be run first.

Development

Environment variables

All environemnt variables from production (described here) are expanded to environemt variables that could be used in development, via .env file. In order to override them, add a .env.development.local file next to .env file and override the desired variables. For example:

REACT_APP_MLRUN_API_URL=http://3.129.154.119:30080
REACT_APP_MLRUN_V3IO_ACCESS_KEY=2826d9df-033d-4ac2-b13a-1f8f9d14aaeb
REACT_APP_NUCLIO_API_URL=http://localhost:8070
REACT_APP_NUCLIO_UI_URL=http://localhost:8070
REACT_APP_FUNCTION_CATALOG_URL=https://raw.githubusercontent.com/mlrun/functions/master

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

Note: npm install should be run first.

ui's People

Contributors

mariana-furyk avatar eran-nussbaum avatar illia-prokopchuk avatar iurii-vatazhyshyn avatar ilan7empest avatar dmytro-panchuk avatar ivanvoznyi avatar mavdryk avatar vasyl-kruk avatar hedingber avatar yuribros1974 avatar skavronsky avatar vasylvovkglo avatar chenk-iguazio avatar sweetops avatar gkirok avatar orkiguazio avatar yaronha avatar

Forkers

vasylvovkglo

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.