From f3b9e0c2e7d899cea0cf31223efde641b22059dd Mon Sep 17 00:00:00 2001 From: James Ketrenos Date: Tue, 24 Jun 2025 08:39:32 -0700 Subject: [PATCH] Deployed --- docker-compose.yml | 45 ++++++++++--------- frontend/src/components/ui/JobViewer.tsx | 3 +- frontend/src/pages/JobAnalysisPage.tsx | 28 +++++++++--- .../src/pages/candidate/RegistrationForms.tsx | 2 +- 4 files changed, 47 insertions(+), 31 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index e2a71fc..1cf355f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -123,28 +123,29 @@ services: networks: - internal - ollama-intel: - image: intelanalytics/ipex-llm-inference-cpp-xpu:latest - container_name: ollama - restart: unless-stopped - env_file: - - .env - devices: - - /dev/dri:/dev/dri - volumes: - - ./cache:/root/.cache # Cache hub models and neo_compiler_cache - - ./ollama:/root/.ollama # Cache the ollama models - ports: - - 11434:11434 - environment: - - OLLAMA_HOST=0.0.0.0 - - DEVICE=Arc - - OLLAMA_INTEL_GPU=true - - OLLAMA_NUM_GPU=999 - - ZES_ENABLE_SYSMAN=1 - - ONEAPI_DEVICE_SELECTOR=level_zero:0 - - TZ=America/Los_Angeles - command: sh -c 'mkdir -p /llm/ollama && cd /llm/ollama && init-ollama && exec ./ollama serve' + # This doesn't work... + # ollama-intel: + # image: intelanalytics/ipex-llm-inference-cpp-xpu:latest + # container_name: ollama-intel + # restart: unless-stopped + # env_file: + # - .env + # devices: + # - /dev/dri:/dev/dri + # volumes: + # - ./cache:/root/.cache # Cache hub models and neo_compiler_cache + # - ./ollama:/root/.ollama # Cache the ollama models + # ports: + # - 11434:11434 + # environment: + # - OLLAMA_HOST=0.0.0.0 + # - DEVICE=Arc + # - OLLAMA_INTEL_GPU=true + # - OLLAMA_NUM_GPU=999 + # - ZES_ENABLE_SYSMAN=1 + # - ONEAPI_DEVICE_SELECTOR=level_zero:0 + # - TZ=America/Los_Angeles + # command: sh -c 'mkdir -p /llm/ollama && cd /llm/ollama && init-ollama && exec ./ollama serve' ollama: build: diff --git a/frontend/src/components/ui/JobViewer.tsx b/frontend/src/components/ui/JobViewer.tsx index d037ed1..6724db9 100644 --- a/frontend/src/components/ui/JobViewer.tsx +++ b/frontend/src/components/ui/JobViewer.tsx @@ -70,7 +70,7 @@ const JobViewer: React.FC = ({ onSelect }) => { const { jobId } = useParams<{ jobId?: string }>(); useEffect(() => { - if (loading) return; // Prevent multiple calls + if (loading || jobs.length !== 0) return; // Prevent multiple calls const getJobs = async (): Promise => { try { const results = await apiClient.getJobs(); @@ -112,6 +112,7 @@ const JobViewer: React.FC = ({ onSelect }) => { sortField, sortOrder, setSelectedJob, + jobs.length, ]); const sortJobs = (jobsList: Job[], field: SortField, order: SortOrder): Job[] => { diff --git a/frontend/src/pages/JobAnalysisPage.tsx b/frontend/src/pages/JobAnalysisPage.tsx index 16ccd18..9424281 100644 --- a/frontend/src/pages/JobAnalysisPage.tsx +++ b/frontend/src/pages/JobAnalysisPage.tsx @@ -26,11 +26,11 @@ import { useSelectedCandidate, useSelectedJob } from 'hooks/GlobalContext'; import { CandidateInfo } from 'components/ui/CandidateInfo'; import { Scrollable } from 'components/Scrollable'; import { CandidatePicker } from 'components/ui/CandidatePicker'; -import { JobPicker } from 'components/ui/JobPicker'; import { JobCreator } from 'components/JobCreator'; import { LoginRestricted } from 'components/ui/LoginRestricted'; import { ResumeGenerator } from 'components/ResumeGenerator'; import { JobInfo } from 'components/ui/JobInfo'; +import { JobsTable } from 'components/ui/JobsTable'; function WorkAddIcon(): JSX.Element { return ( @@ -212,13 +212,17 @@ const JobAnalysisPage: React.FC = (_props: BackstoryPageProp handleNext(); }; - const onJobSelect = (job: Job): void => { + const onJobsSelected = (jobs: Job[]): void => { if (!analysisState) { return; } - analysisState.job = job; + if (jobs.length === 0) { + setError('No jobs selected.'); + return; + } + analysisState.job = jobs[0]; setAnalysisState({ ...analysisState }); - setSelectedJob(job); + setSelectedJob(jobs[0]); handleNext(); }; @@ -242,11 +246,21 @@ const JobAnalysisPage: React.FC = (_props: BackstoryPageProp - {jobTab === 'select' && } - {jobTab === 'create' && user && } + {jobTab === 'select' && } + {jobTab === 'create' && user && ( + { + onJobsSelected([job]); + }} + /> + )} {jobTab === 'create' && guest && ( - + { + onJobsSelected([job]); + }} + /> )} diff --git a/frontend/src/pages/candidate/RegistrationForms.tsx b/frontend/src/pages/candidate/RegistrationForms.tsx index a020280..6f784b4 100644 --- a/frontend/src/pages/candidate/RegistrationForms.tsx +++ b/frontend/src/pages/candidate/RegistrationForms.tsx @@ -815,7 +815,7 @@ const EmployerRegistrationForm = (): JSX.Element => { }; // Registration Type Selector Component -export function RegistrationTypeSelector() { +export function RegistrationTypeSelector(): JSX.Element { const navigate = useNavigate(); return (