Skip to content

Commit

Permalink
Merge pull request #136 from rh-aiservices-bu/feature/prepare-for-mai…
Browse files Browse the repository at this point in the history
…n-merge

Merging dev into main
  • Loading branch information
guimou authored Jan 18, 2024
2 parents c061cdb + 9760fe5 commit 177e176
Show file tree
Hide file tree
Showing 156 changed files with 3,054 additions and 1,010 deletions.
72 changes: 72 additions & 0 deletions .github/.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,41 +18,61 @@ Auth
backend
Backend
bgd
bordershadow
bugfix
CarImage
cd
centric
cephfs
Chase
ChatGPT
ChatOps
Chris
claimdb
CLI
cls
CMD
config
Config
courseware
cpu
CreateNamespace
dailyrun
dataset
datasets
defaultPolicy
det
dev
Dev
DevOps
dex
diag
dir
dotenv
drawio
ds
DS
DSP
dvh
eCommerce
elyra
Elyra
eng
env
EOF
EQ
Erwan
eslint
Eventing
EXAMPLEs
FastAPI
ffdrf
fi
formatter
fromarray
frontend
Frontend
GiB
gitea
Gitea
GITEA
Expand All @@ -68,60 +88,93 @@ Guidera
Guillaume
Guillaume's
highlightjs
hoc
Hoc
hourlyrun
html
http
https
huggingface
ibm
ic
imagesdir
img
imgsz
Immage
InfluxDB
Inlining
insecureEdgeTerminationPolicy
io
ipynb
js
json
jsonpath
jupyter
Jupyter
JupyterLab
kubectl
kubernetes
linter
llm
LLM
LLMs
localhost
lr
lrf
Lundberg
LWBS
mAP
md
minio
Minio
mistralai
mn
mockups
modelmesh
ModelMesh
modelresults
Moutier
namespace
namespaces
nav
Nodejs
npm
oc
ocs
ods
ojsonpath
ok
onnx
opencv
OpenCV
openshift
OpenShift
openShiftOAuth
OpenSift
opentlc
OpenVINO
patternfly
Patternfly
PatternFly
PersistantStorageClaims
PersistentVolumeClaim
PersistentVolumeClaims
pipelineserver
Pipfile
pn
png
Podman
podname
Postgres
PostgreSql
Prasanth
pre
Productization
productname
proj
proto
PRs
pvc
py
pytorch
Pytorch
Expand All @@ -133,44 +186,63 @@ redhat
repo
repoURL
RespectIgnoreDifferences
RestUrl
rh
rhoai
RHOAI
rhods
rhpds
rhs
Robert
roboflow
Roboflow
RoboFlow
rollout
runtime
RWX
selfHeal
Serverless
src
sso
StorageClass
storagecluster
stylePaths
stylesheet
subfolder
subfolders
summarization
Summarization
svc
svg
SVG
SVG's
syncOptions
syncPolicy
targetRevision
TBD
Tekton
TGI
tls
TODO
txt
TypeScript
UAT
UI
un
unopinionated
url
userX
venv
vscode
VSCode
wb
webpack
Webpack
www
yaml
YAML
yolo
YOLO
yolov
YOLOv
YOLOV
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Publish to GitHub Pages
on:
push:
branches: [dev]
branches: [main]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
concurrency:
Expand Down
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ logs
# build
www
www-cache
app/backend/public/*
!app/backend/public/.folder_keep

# cache
__pycache__
Expand All @@ -38,3 +40,13 @@ package-lock.json

# local python env
.venv

# notebook checkpoints
*/*/.ipynb_checkpoints/*
*/*/*/.ipynb_checkpoints/*


# training stuff
lab-materials/04/datasets/*
lab-materials/04/runs/*

52 changes: 52 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,56 @@ From the main folder, launch `npm run dev`. This will launch both backend and fr
- Frontend is accessible at `http://localhost:9000`
- Backend is accessible at `http://localhost:5000`, with Swagger API doc at `http://localhost:5000/docs`

```bash
#!/bin/bash

# Script to restart all showroom pods - You must be logged in as a cluster admin to run this script

# Get all namespaces
namespaces=$(oc get namespaces -o jsonpath='{.items[*].metadata.name}' \
| tr ' ' '\n' \
| grep '^showroom')

# Stop all the pods
for namespace in $namespaces; do
# Check if the deployment "showroom" exists in the namespace
if oc -n $namespace get deployment showroom &> /dev/null; then
# If it exists, restart the rollout
# oc -n $namespace rollout restart deployment/showroom
oc -n $namespace scale deploy showroom --replicas=0
fi
done


# wait for them all to fully stop
# start all the pods
for namespace in $namespaces; do
# Check if the deployment "showroom" exists in the namespace
if oc -n $namespace get deployment showroom &> /dev/null; then
# If it exists, restart the rollout
# oc -n $namespace rollout restart deployment/showroom
oc -n $namespace scale deploy showroom --replicas=1
fi
done


```

## How to graduate code from dev to main

- From `dev`, create a new branch, like `feature/prepare-for-main-merge`.
- Modify the following files to make their relevant content point to `main`:
- `bootstrap/applicationset/applicationset-bootstrap.yaml`
- `content/antora.yml`
- `content/modules/ROOT/pages/05-03-web-app-deploy-application.adoc`
- Make a pull request from this branch to `main`, review and merge

</details>

<details>
<summary>Links for RH1 event environment assignment</summary>

- URL for all labs: [https://one.demo.redhat.com/](https://one.demo.redhat.com/)
- Search for `insurance`

</details>
21 changes: 21 additions & 0 deletions app/Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM registry.access.redhat.com/ubi9/nodejs-18 as stage

USER root

WORKDIR /tmp

RUN git clone https://github.com/rh-aiservices-bu/insurance-claim-processing.git

FROM registry.access.redhat.com/ubi9/nodejs-18

USER root

COPY --from=stage /tmp/insurance-claim-processing/app/ /tmp/src

RUN chown -R 1001:0 /tmp/src

USER 1001

RUN /usr/libexec/s2i/assemble

CMD /usr/libexec/s2i/run
5 changes: 0 additions & 5 deletions app/backend/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[[source]]
url = "https://download.pytorch.org/whl/cu118/"
verify_ssl = false
name = "pytorch"

[packages]
boto3 = "~=1.28.0"
fastapi = "~=0.104.0"
Expand Down
1 change: 1 addition & 0 deletions app/claimdb/03-claims_table_creation.sql
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ CREATE TABLE IF NOT EXISTS claims.claims
summary text COLLATE pg_catalog."default",
location text COLLATE pg_catalog."default",
"time" text COLLATE pg_catalog."default",
sentiment text COLLATE pg_catalog."default",
CONSTRAINT claims_pkey PRIMARY KEY (id)
)
WITH (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const ClaimDetail: React.FunctionComponent<ClaimDetailProps> = () => {
<Text component={TextVariants.h3}>Body:</Text>
<div className='display-linebreak'>{claim.body}</div>
<Text component={TextVariants.h3}>Attached images:</Text>
{claim && claim.original_images && <ImageCarousel images={claim.original_images} />}
{claim && claim.original_images && <Grid><GridItem span={4}><ImageCarousel images={claim.original_images}/></GridItem></Grid>}
</TextContent>
</AccordionContent>
</AccordionItem>
Expand Down
6 changes: 3 additions & 3 deletions app/frontend/src/app/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ const routes: AppRouteConfig[] = [
path: '/',
title: 'Original App',
},
{
/* {
component: NewApp,
exact: true,
path: '/newapp',
title: 'NewApp',
},
}, */
{
component: ClaimsList,
exact: true,
label: 'Claims List (New App)',
label: 'New App',
path: '/ClaimsList',
title: 'Claims List',
},
Expand Down
Loading

0 comments on commit 177e176

Please sign in to comment.