Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Create Llama
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
run-llama
Create Llama
Commits
238a0b5d
Commit
238a0b5d
authored
1 year ago
by
Marcus Schiesser
Browse files
Options
Downloads
Patches
Plain Diff
fix: don't install root package for llamapack examples (as there isn't one)
parent
71bd256f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
helpers/llama-pack.ts
+1
-1
1 addition, 1 deletion
helpers/llama-pack.ts
helpers/poetry.ts
+4
-2
4 additions, 2 deletions
helpers/poetry.ts
helpers/python.ts
+5
-3
5 additions, 3 deletions
helpers/python.ts
with
10 additions
and
6 deletions
helpers/llama-pack.ts
+
1
−
1
View file @
238a0b5d
...
...
@@ -86,6 +86,6 @@ export const installLlamapackProject = async ({
await
copyData
({
root
});
await
installLlamapackExample
({
root
,
llamapack
});
if
(
postInstallAction
!==
"
none
"
)
{
installPythonDependencies
(
root
);
installPythonDependencies
(
{
noRoot
:
true
}
);
}
};
This diff is collapsed.
Click to expand it.
helpers/poetry.ts
+
4
−
2
View file @
238a0b5d
...
...
@@ -10,9 +10,11 @@ export function isPoetryAvailable(): boolean {
return
false
;
}
export
function
tryPoetryInstall
():
boolean
{
export
function
tryPoetryInstall
(
noRoot
:
boolean
):
boolean
{
try
{
execSync
(
"
poetry install
"
,
{
stdio
:
"
inherit
"
});
execSync
(
`poetry install
${
noRoot
?
"
--no-root
"
:
""
}
`
,
{
stdio
:
"
inherit
"
,
});
return
true
;
}
catch
(
_
)
{}
return
false
;
...
...
This diff is collapsed.
Click to expand it.
helpers/python.ts
+
5
−
3
View file @
238a0b5d
...
...
@@ -92,12 +92,14 @@ export const addDependencies = async (
}
};
export
const
installPythonDependencies
=
(
root
:
string
)
=>
{
export
const
installPythonDependencies
=
(
{
noRoot
}:
{
noRoot
:
boolean
}
=
{
noRoot
:
false
},
)
=>
{
if
(
isPoetryAvailable
())
{
console
.
log
(
`Installing python dependencies using poetry. This may take a while...`
,
);
const
installSuccessful
=
tryPoetryInstall
();
const
installSuccessful
=
tryPoetryInstall
(
noRoot
);
if
(
!
installSuccessful
)
{
console
.
error
(
red
(
"
Install failed. Please install dependencies manually.
"
),
...
...
@@ -181,6 +183,6 @@ export const installPythonTemplate = async ({
await
addDependencies
(
root
,
addOnDependencies
);
if
(
postInstallAction
!==
"
none
"
)
{
installPythonDependencies
(
root
);
installPythonDependencies
();
}
};
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