/* App starts here */ import React, { useState, useEffect } from "react"; import ReactMarkdown from "react-markdown/with-html"; import CodeBlock from "./CodeBlock"; import MarkdownLoader from "./markdown-loader"; import Tab from "react-bootstrap/Tab"; import Tabs from "react-bootstrap/Tabs"; import Col from "react-bootstrap/Col"; import Row from "react-bootstrap/Row"; import "./solutions.css"; const solutions = [ { category: "HPC", title: "intel-hpc-bench", asset: "hpc.png", summary: "HPC Benchmark workloads", git: "https://gitlab.devtools.intel.com/vtt/sws/osgc/solutions/intel-hcp-bench" }, { category: "AI/ML", title: "intel-pytorch", asset: "intel-pytorch.png", summary: "basic pytorch container", git: "https://gitlab.devtools.intel.com/vtt/sws/osgc/solutions/intel-pytorch" },/* { category: "compute", title: "intel-efficientnet", summary: "No summary provided", git: "https://gitlab.devtools.intel.com/vtt/sws/osgc/solutions/intel-efficientnet" }, { category: "compute", title: "intel-deepspeech", summary: "Container featuring the Mozilla DeepSpeech speech-to-text implementation in tensorflow.", git: "https://gitlab.devtools.intel.com/vtt/sws/osgc/solutions/intel-deepspeech" },*/ /*{ category: "compute", title: "intel-deepvoice3", summary: "Deepvoice3 text to speech container using Intel GPU and deepspeech3 pytorch.", git: "https://gitlab.devtools.intel.com/vtt/sws/osgc/solutions/intel-deepvoice3" },*/ /*{ category: "compute", title: "intel-rl", summary: "Intel reinforcement learning container", git: "https://gitlab.devtools.intel.com/vtt/sws/osgc/solutions/intel-rl" },*/ { category: "AI/ML,HPC", title: "intel-compute-clinfo", asset: "intel-compute-clinfo.png", summary: "Basic container installing OpenCL runtime; testing packages", git: "https://gitlab.devtools.intel.com/vtt/sws/osgc/solutions/intel-compute-clinfo" }, { category: "Media", title: "intel-media-ffmpeg", asset: "intel-media-ffmpeg.svg", summary: "Perform various media tests using ffmpeg", git: "https://gitlab.devtools.intel.com/vtt/sws/osgc/solutions/intel-media-ffmpeg" } ]; class CategoryPicker extends React.Component { constructor(props) { super(props); console.log("CategoryPicker"); this.clearFilter = this.clearFilter.bind(this); } clearFilter() { if (window.clearFilter) { window.clearFilter(); } } render() { const categories = []; solutions.forEach(solution => { solution.category.split(",").forEach(category => { if (categories.indexOf(category) != -1) { return; } categories.push(category); }) }); const tabs = categories.sort().map(category => ( )); return ( { tabs } ); } } class SolutionsPicker extends React.Component { constructor(props) { super(props); console.log("SolutionsPicker"); } render () { const solutionsContent = solutions .filter(solution => this.props.filter == "*" || solution.category == this.props.filter) .sort((A, B) => { return A.title.localeCompare(B.title) }) .map((solution, i) => { return (
{solution.title}
{solution.summary}
)}); return (
{ solutionsContent }
); } } class Solution extends React.Component { constructor(props) { super(props); console.log("Solution: ", this.props.solution); } formatString(string) { if (/^https?:\/\//.exec(string)) { return ({string}); } else { return string; } } solutionContent(solution) { let markdownPath = "", basename = ""; if (solution.git) { basename = solution.git.replace(/^.*\/([^/]+)$/, "$1"); if (basename) { markdownPath = "solutions/" + basename + ".md"; } } if (!basename) { return (); } return (); } render() { const solution = this.props.solution; return (
Back
{solution.category}
{solution.title}
{solution.summary}
{ this.solutionContent(this.props.solution) }
) } } class Solutions extends React.Component { constructor(props) { super(props); console.log("Solutions"); this.state = { activeSolution: null }; this.onSolutionChanged = this.onSolutionChanged.bind(this); } onSolutionChanged(solution) { console.log("onSolutionChanged: " + solution); this.setState({ activeSolution: solution }); } render () { return (
This site is a work in progress and under active development.
{ this.state.activeSolution ? : }
); } } export default Solutions;