Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Transformerlab App
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mirrored_repos
MachineLearning
TransformerLab
Transformerlab App
Commits
a88fa7e3
Commit
a88fa7e3
authored
11 months ago
by
Ali Asaria
Browse files
Options
Downloads
Patches
Plain Diff
show error if install_conda fails
parent
a1225a15
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/main.ts
+4
-3
4 additions, 3 deletions
src/main/main.ts
src/renderer/components/Connect/LocalConnection.tsx
+26
-13
26 additions, 13 deletions
src/renderer/components/Connect/LocalConnection.tsx
with
30 additions
and
16 deletions
src/main/main.ts
+
4
−
3
View file @
a88fa7e3
...
@@ -68,7 +68,7 @@ ipcMain.handle('server:checkSystemRequirements', async (event) => {
...
@@ -68,7 +68,7 @@ ipcMain.handle('server:checkSystemRequirements', async (event) => {
});
});
ipcMain
.
handle
(
'
server:checkIfInstalledLocally
'
,
async
(
event
)
=>
{
ipcMain
.
handle
(
'
server:checkIfInstalledLocally
'
,
async
(
event
)
=>
{
return
await
checkLocalServerVersion
()
!==
false
;
return
(
await
checkLocalServerVersion
()
)
!==
false
;
});
});
ipcMain
.
handle
(
'
server:checkLocalVersion
'
,
async
(
event
)
=>
{
ipcMain
.
handle
(
'
server:checkLocalVersion
'
,
async
(
event
)
=>
{
...
@@ -85,9 +85,10 @@ ipcMain.handle('server:InstallLocally', async (event) => {
...
@@ -85,9 +85,10 @@ ipcMain.handle('server:InstallLocally', async (event) => {
ipcMain
.
handle
(
'
server:install_conda
'
,
async
(
event
)
=>
{
ipcMain
.
handle
(
'
server:install_conda
'
,
async
(
event
)
=>
{
console
.
log
(
'
** Installing conda
'
);
console
.
log
(
'
** Installing conda
'
);
await
executeInstallStep
(
'
install_conda
'
);
const
response
=
await
executeInstallStep
(
'
install_conda
'
);
console
.
log
(
response
?.
stdout
);
console
.
log
(
'
Finishing installing conda
'
);
console
.
log
(
'
Finishing installing conda
'
);
return
;
return
response
;
});
});
ipcMain
.
handle
(
'
server:install_create-conda-environment
'
,
async
(
event
)
=>
{
ipcMain
.
handle
(
'
server:install_create-conda-environment
'
,
async
(
event
)
=>
{
...
...
This diff is collapsed.
Click to expand it.
src/renderer/components/Connect/LocalConnection.tsx
+
26
−
13
View file @
a88fa7e3
...
@@ -439,7 +439,7 @@ function CheckForPlugins({ activeStep, setActiveStep }) {
...
@@ -439,7 +439,7 @@ function CheckForPlugins({ activeStep, setActiveStep }) {
function
CheckIfCondaInstalled
({
activeStep
,
setActiveStep
})
{
function
CheckIfCondaInstalled
({
activeStep
,
setActiveStep
})
{
const
[
installStatus
,
setInstallStatus
]
=
useState
(
''
);
// notstarted, pending, success, error
const
[
installStatus
,
setInstallStatus
]
=
useState
(
''
);
// notstarted, pending, success, error
const
[
errorMessage
,
setErrorMessage
]
=
useState
(
null
);
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
activeStep
!==
Steps
.
indexOf
(
'
CHECK_IF_CONDA_INSTALLED
'
))
return
;
if
(
activeStep
!==
Steps
.
indexOf
(
'
CHECK_IF_CONDA_INSTALLED
'
))
return
;
...
@@ -462,11 +462,13 @@ function CheckIfCondaInstalled({ activeStep, setActiveStep }) {
...
@@ -462,11 +462,13 @@ function CheckIfCondaInstalled({ activeStep, setActiveStep }) {
{
installStatus
==
'
success
'
&&
<
Chip
color
=
"success"
>
Success!
</
Chip
>
}
{
installStatus
==
'
success
'
&&
<
Chip
color
=
"success"
>
Success!
</
Chip
>
}
{
installStatus
==
'
pending
'
&&
(
{
installStatus
==
'
pending
'
&&
(
<>
<>
<
CircularProgress
color
=
"primary"
/>
Installing. This can take a
<
Typography
level
=
"body-sm"
color
=
"neutral"
>
while.
<
CircularProgress
color
=
"primary"
/>
<
br
/>
Installing. This can take a while.
</
Typography
>
</>
</>
)
}
)
}
{
activeStep
==
Steps
.
indexOf
(
'
CHECK_IF_CONDA_INSTALLED
'
)
&&
{
activeStep
==
Steps
.
indexOf
(
'
CHECK_IF_CONDA_INSTALLED
'
)
&&
installStatus
==
'
notstarted
'
&&
(
installStatus
==
'
notstarted
'
&&
(
<
ButtonGroup
variant
=
"plain"
spacing
=
{
1
}
>
<
ButtonGroup
variant
=
"plain"
spacing
=
{
1
}
>
...
@@ -479,6 +481,10 @@ function CheckIfCondaInstalled({ activeStep, setActiveStep }) {
...
@@ -479,6 +481,10 @@ function CheckIfCondaInstalled({ activeStep, setActiveStep }) {
const
installConda
=
await
window
.
electron
.
ipcRenderer
.
invoke
(
const
installConda
=
await
window
.
electron
.
ipcRenderer
.
invoke
(
'
server:install_conda
'
'
server:install_conda
'
);
);
if
(
installConda
?.
error
)
{
setInstallStatus
(
'
error
'
);
setErrorMessage
(
installConda
?.
stderr
);
}
const
condaExists
=
await
window
.
electron
.
ipcRenderer
.
invoke
(
const
condaExists
=
await
window
.
electron
.
ipcRenderer
.
invoke
(
'
server:checkIfCondaExists
'
'
server:checkIfCondaExists
'
);
);
...
@@ -504,7 +510,9 @@ function CheckIfCondaInstalled({ activeStep, setActiveStep }) {
...
@@ -504,7 +510,9 @@ function CheckIfCondaInstalled({ activeStep, setActiveStep }) {
}
}
return
false
;
return
false
;
},
},
()
=>
{},
()
=>
{
setInstallStatus
(
'
error
'
);
},
2000
,
2000
,
8
8
);
);
...
@@ -514,6 +522,15 @@ function CheckIfCondaInstalled({ activeStep, setActiveStep }) {
...
@@ -514,6 +522,15 @@ function CheckIfCondaInstalled({ activeStep, setActiveStep }) {
</
Button
>
</
Button
>
</
ButtonGroup
>
</
ButtonGroup
>
)
}
)
}
<
Typography
level
=
"body-sm"
color
=
"warning"
>
{
errorMessage
&&
(
<>
Transformer Lab encountered the following unexpected Error:
<
pre
style
=
{
{
whiteSpace
:
'
pre-wrap
'
}
}
>
{
errorMessage
}
</
pre
>
Please try to fix the above issue and restart the app.
</>
)
}
</
Typography
>
</
Stack
>
</
Stack
>
</>
</>
);
);
...
@@ -641,10 +658,7 @@ function CheckDependencies({ activeStep, setActiveStep }) {
...
@@ -641,10 +658,7 @@ function CheckDependencies({ activeStep, setActiveStep }) {
'
server:checkDependencies
'
'
server:checkDependencies
'
);
);
if
(
if
(
ipcResponse
?.
status
==
'
success
'
&&
ipcResponse
?.
data
?.
length
==
0
)
{
ipcResponse
?.
status
==
'
success
'
&&
ipcResponse
?.
data
?.
length
==
0
)
{
setInstallStatus
(
'
success
'
);
setInstallStatus
(
'
success
'
);
setActiveStep
(
setActiveStep
(
Steps
.
indexOf
(
'
CHECK_IF_PYTHON_DEPENDENCIES_INSTALLED
'
)
+
1
Steps
.
indexOf
(
'
CHECK_IF_PYTHON_DEPENDENCIES_INSTALLED
'
)
+
1
...
@@ -691,10 +705,9 @@ function CheckDependencies({ activeStep, setActiveStep }) {
...
@@ -691,10 +705,9 @@ function CheckDependencies({ activeStep, setActiveStep }) {
'
server:install_install-dependencies
'
'
server:install_install-dependencies
'
);
);
const
ipcResponse
=
const
ipcResponse
=
await
window
.
electron
.
ipcRenderer
.
invoke
(
await
window
.
electron
.
ipcRenderer
.
invoke
(
'
server:checkDependencies
'
'
server:checkDependencies
'
);
);
if
(
if
(
ipcResponse
?.
status
==
'
success
'
&&
ipcResponse
?.
status
==
'
success
'
&&
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment