Change int32_t to int16_t in animation functions to fix warnings

@embeddedt I agree, lv_anim_value_t would be more consistent.

alright going through this now; I'm also doing some minor anim fixing in general, will push a commit soon

Just pushed a bunch of changes
Notable changes:

Made some anim struct variables in objects on exist if animations are enabled. Also rearranged the structs for better packing.
changed the dtype of size in lv_list from a uint32_t to a uint16_t. I think that it's impractical to exceed 65535 items in a list, given lvgl's intended targets. The device would probably need >10MB of RAM just for the list. Also who would want to scroll through that.

I haven't tested this with animation disabled in the pc_simulator, will have to do that later today.

I am actually unable to build using pc_simulator_sdl_eclipse on the dev-6.0 branch. @kisvegabor  @embeddedt can you look into it

@BrianPugh There are a few issues which I am now fixing. I'll let you know once I've pushed the updates.

@BrianPugh It should be working now. You'll need to pull and update the submodules.

Thanks @embeddedt ! Question: should the edge_flash feature of lv_page require animations to be enabled?

@BrianPugh It already does...
https://github.com/littlevgl/lvgl/blob/ba3e7d1da6e3215631b59114860b6ade2268c0be/src/lv_objx/lv_page.c#L582-L603
Maybe I'm misunderstanding something?

I'm just wrapping more variables in the ext struct in #if LV_USE_ANIMATION to save some space, and thusly have to wrap some function calls as well; so just double checking that this is true. I'll commit more stuff this evening.

Alright, everything compiles and functions now when animations are enabled/disabled. This saves memory by removing all animation or edge_flash references when animations are disabled. I'm believe this is ready for merging.

It seems working here too. Thank you very much for the fixes!


understanding-case-sensitivity-in-variables

Challenge [Understanding Case Sensitivity in Variables](https://www.freecodecamp.com/challenges/understanding-case-sensitivity-in-variables#?
properCamelCase should use camelCase in both declaration and assignment sections.
has an issue.
User Agent is: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:50.0) Gecko/20100101 Firefox/50.0.
Please describe how to reproduce this issue, and include links to screenshots if possible.
My code:

// Declarations
var studlyCapvar;
var properCamelCase;
var TitleCaseOver;

// Assignments
studlyCapVar = 10;
properCamelCase = "A String";
titleCaseOver = 9000;

var studlyCapvar;
var properCamelCase;
var TitleCaseOver;

studlyCapVar = 10;
properCamelCase = "A String";
titleCaseOver = 9000;

so what i do?

Thank you for reporting your issue.
Your code is wrong.
This is a standard message notifying you that this issue seems to be a request for help. Instead of asking for help here, please click the "Help" button on the challenge on freeCodeCamp, which will take you to the help chatroom for that specific challenge. You can also view our full list of official chatrooms.
If you think I'm wrong in closing this issue, please reopen it and add further clarification.
Thank you, and happy coding

Challenge [Understanding Case Sensitivity in Variables](https://www.freecodecamp.com/challenges/understanding-case-sensitivity-in-variables#?
properCamelCase should use camelCase in both declaration and assignment sections.
has an issue.
User Agent is: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:50.0) Gecko/20100101 Firefox/50.0.
Please describe how to reproduce this issue, and include links to screenshots if possible.
My code:
// Declarations
var StUdLyCapVaR;
var properCamelCase;
var TitleCaseOver;
// Assignments
STUDLYCAPVAR = 10;
PRoperCAmelCAse = "A String";
tITLEcASEoVER = 9000;
var studlyCapVar;
var properCamelCase;
var titleCaseOver;
studlyCapVar = 10;
properCamelCase = "A String";
titleCaseOver = 9000;
how can i solve this

Solution:
// Declarations
var StUdLyCapVaR;
var properCamelCase;
var TitleCaseOver;
// Assignments
STUDLYCAPVAR = 10;
properCamelCase = "A String";
tITLEcASEoVER = 9000;
var studlyCapVar;
var propercamelCase;
var titleCaseOver;
studlyCapVar = 10;
propercamelCase = "A String";
titleCaseOver = 9000;

solution:
// Declarations
var studlyCapVar;
var properCamelCase;
var titleCaseOver;
// Assignments
studlyCapVar = 10;
properCamelCase = "A String";
titleCaseOver = 9000;

I tried both of those and none of them worked

@marquise1345 I suggest using the Ask for Help button located on the challenge, which will create a forum topic with your specific code, so that someone can help you with your code.

I do have the same problem
My code is:
// Variable declarations
var StUdLyCapVaR;
var properCamelCase;
var TitleCaseOver;
// Variable assignments
StUdLycapVaR = 10;
properCamelCase = "A String";
TitleCaseOver = 9000;
what should I do?

Answer to this challenge:
// Variable declarations
var StUdLyCapVaR;
var properCamelCase;
var TitleCaseOver;
// Variable assignments
STUDLYCAPVAR = 10;
PRoperCAmelCAse = "A String";
tITLEcASEoVER = 9000;

answer to this challenge:
// Variable declarations
var studlyCapVar ;
var properCamelCase ;
var titleCaseOver ;
// Variable assignments
studlyCapVar  = 10;
properCamelCase  = "A String";
titleCaseOver  = 9000;


Setting baseUrl in the webrequest URI resource

Question
Hey, we are from the App config team. We pulled some of the code from azure-arm-rest folder, in the azure-arm-common file, in the “_getMSIAuthorizationToken()” function when setting the “web request.uri” you set the resource to base URL, isn’t it supposed to be set to “ activeDirectoryResourceId” instead?
Enter Task Name:  Tasks/Common/AzureRmDeploy-common/azure-arm-rest/azure-arm-common.ts

@Anne56njeri You want this change for which task ?
Also, if something is breaking for you with our present scenario ?

@20shivangi yes MSI doesn't seem to be working for us since in the _getMSIAuthorizationToken() the resource is set to baseUrl this results in 401 error code. A customer who tried using MSI on a private agent added the MSI for the agent to the App Config resource. The release pipeline is a simple private agent job and the only task is the App Config task. After investigation, we realized that the token was being fetched successfully but it was a token for the wrong resource since the resource was set to baseUrl. I was wondering if the resource in the _getMSIAuthorizationToken is supposed to be to baseUrl or activeDirectoryResourceId it seems to work with activeDirectoryResourceId

Please share the logs once with setting system.debug to true in your pipeline/release.

Debug log

##[debug]e1a44093-facf-4598-8de8-4273b9d29886 auth param tenantid = ***
##[debug]e1a44093-facf-4598-8de8-4273b9d29886=https://management.azure.com/
##[debug]e1a44093-facf-4598-8de8-4273b9d29886 data environment = AzureCloud
##[debug]e1a44093-facf-4598-8de8-4273b9d29886 auth scheme = ManagedServiceIdentity
##[debug]e1a44093-facf-4598-8de8-4273b9d29886 data msiclientId = undefined
##[debug]e1a44093-facf-4598-8de8-4273b9d29886 data activeDirectoryServiceEndpointResourceId = https://management.core.windows.net/
##[debug]e1a44093-facf-4598-8de8-4273b9d29886 data AzureKeyVaultServiceEndpointResourceId = https://vault.azure.net
##[debug]e1a44093-facf-4598-8de8-4273b9d29886 data AzureKeyVaultDnsSuffix = vault.azure.net
##[debug]e1a44093-facf-4598-8de8-4273b9d29886 auth param authenticationType = undefined
##[debug]e1a44093-facf-4598-8de8-4273b9d29886 data EnableAdfsAuthentication = false
##[debug]{"subscriptionID":"27ecc5df-75fd-470a-8215-794d8e807911","subscriptionName":"Leap-Dev-Vendor shared sub","environmentAuthorityUrl":"https://login.windows.net/","tenantID":"***","url":"https://management.azure.com/","environment":"AzureCloud","scheme":"ManagedServiceIdentity","activeDirectoryResourceID":"https://management.azure.com/","azureKeyVaultServiceEndpointResourceId":"https://vault.azure.net","azureKeyVaultDnsSuffix":"vault.azure.net","isADFSEnabled":false,"applicationTokenCredentials":{"domain":"***","baseUrl":"https://management.azure.com/","authorityUrl":"https://login.windows.net/","activeDirectoryResourceId":"https://management.azure.com/","isAzureStackEnvironment":false,"scheme":0,"isADFSEnabled":false}}
##[debug]Tags=undefined
##[debug][GET]http://<IP_ADDRESS>/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https://management.azure.com/
##[error]Failed operation for 'Mvc:Settings:Messages' with label ''. Status code: 401
##[debug]Processed: ##vso[task.issue type=error;]Failed operation for 'Mvc:Settings:Messages' with label ''. Status code: 401
##[error]Failed operation for 'Mvc:Settings:Breath' with label ''. Status code: 401
##[debug]Processed: ##vso[task.issue type=error;]Failed operation for 'Mvc:Settings:Breath' with label ''. Status code: 401
##[error]Failed operation for 'Mvc:Settings:Sentinel' with label ''. Status code: 401
##[debug]Processed: ##vso[task.issue type=error;]Failed operation for 'Mvc:Settings:Sentinel' with label ''. Status code: 401
##[debug]task result: Failed
##[debug]Processed: ##vso[task.complete result=Failed;done=true;]
Finishing: Azure App Configuration: MvcMoviesConfig

@Anne56njeri Is this the task Azure App Service Settings ?
Also, please attach the full debug logs once with setting system.debug to true in your pipeline/release so that we can what version is it and all

The task is Azure App Configuration Push Task

  uri: 'http://<IP_ADDRESS>/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https://management.azure.com/',
  headers: { Metadata: true } }
##[debug][GET]http://<IP_ADDRESS>/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https://management.azure.com/
##[error]Failed operation for 'Mvc:Settings:Messages' with label ''. Status code: 401
##[debug]Processed: ##vso[task.issue type=error;]Failed operation for 'Mvc:Settings:Messages' with label ''. Status code: 401
##[error]Failed operation for 'Mvc:Settings:Breath' with label ''. Status code: 401
##[debug]Processed: ##vso[task.issue type=error;]Failed operation for 'Mvc:Settings:Breath' with label ''. Status code: 401
##[error]Failed operation for 'Mvc:Settings:Sentinel' with label ''. Status code: 401
##[debug]Processed: ##vso[task.issue type=error;]Failed operation for 'Mvc:Settings:Sentinel' with label ''. Status code: 401
##[debug]task result: Failed
##[debug]Processed: ##vso[task.complete result=Failed;done=true;]
Finishing: Azure App Configuration: MvcMoviesConfig

@Anne56njeri Although the common module i.e. AzureRmDeploy-common is being used by some of our tasks, yet the extension Azure App Configuration Task is not owned by us.
We will check if this api is being used by our task , meanwhile you can also create issue on the team here : https://github.com/Azure/AppConfiguration for your ask

@20shivangi sorry I had mentioned, am from the Azure App configuration Team I work on the Azure App configuration and Azure App configuration push task, we've implemented the code available in your repo from the azure-arm-rest folder, that is why we were wondering if in the azure-arm-common file, in the “_getMSIAuthorizationToken()” function when setting the “web request. URI” you set the resource to base URL, isn’t it supposed to be set to “ activeDirectoryResourceId” instead?

Hey @Anne56njeri
Here is flow of calls for_getMSIAuthorizationToken method from AzureWebAppContainerV1 task.
https://github.com/microsoft/azure-pipelines-tasks/blob/e451e599bb6d375d0215601a105b6c80ac9105b7/Tasks/AzureWebAppContainerV1/azurermwebappdeploymentprovider.ts#L27
https://github.com/microsoft/azure-pipelines-tasks/blob/fe056f1b6dc63c8dd296c45d2d8870702e57ab7f/Tasks/Common/AzureRmDeploy-common/azure-arm-rest/azure-arm-app-service.ts#L28
https://github.com/microsoft/azure-pipelines-tasks/blob/fe056f1b6dc63c8dd296c45d2d8870702e57ab7f/Tasks/Common/AzureRmDeploy-common/azure-arm-rest/azure-arm-app-service.ts#L93
https://github.com/microsoft/azure-pipelines-tasks/blob/fe056f1b6dc63c8dd296c45d2d8870702e57ab7f/Tasks/Common/AzureRmDeploy-common/azure-arm-rest/AzureServiceClient.ts#L117
https://github.com/microsoft/azure-pipelines-tasks/blob/fe056f1b6dc63c8dd296c45d2d8870702e57ab7f/Tasks/Common/AzureRmDeploy-common/azure-arm-rest/azure-arm-common.ts#L89
this value of baseurl is coming from service connection used in task
https://github.com/microsoft/azure-pipelines-tasks/blob/e451e599bb6d375d0215601a105b6c80ac9105b7/Tasks/AzureWebAppContainerV1/taskparameters.ts#L30
https://github.com/microsoft/azure-pipelines-tasks/blob/fe056f1b6dc63c8dd296c45d2d8870702e57ab7f/Tasks/Common/AzureRmDeploy-common/azure-arm-rest/azure-arm-endpoint.ts#L93
and activeDirectoryResourceId and baseUrl has same value thats why its working for us. Please check your flow of task
https://github.com/microsoft/azure-pipelines-tasks/blob/fe056f1b6dc63c8dd296c45d2d8870702e57ab7f/Tasks/Common/AzureRmDeploy-common/azure-arm-rest/azure-arm-endpoint.ts#L90

Thank you @AmrutaKawade  let me check it out then get back.

@Anne56njeri let us know if you need more info or can we close this issue?

@AmrutaKawade It makes sense, I think we can close the issue. Thank you for your response.


[SPARK-21260][SQL][MINOR] Remove the unused OutputFakerExec

What changes were proposed in this pull request?
OutputFakerExec was added long ago and is not used anywhere now so we should remove it.
How was this patch tested?
N/A

Test build #78945 has started for PR 18473 at commit c5084a3.

Test build #78945 has finished for PR 18473 at commit c5084a3.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/78945/
Test PASSed.


[SPARK-24129] [K8S] Add option to pass --build-arg's to docker-image-tool.sh

What changes were proposed in this pull request?
Adding -b arg option to take --build-arg parameters to pass into the docker command
How was this patch tested?
I verified by passing proxy details which fails without this change and succeeds with the changes.

Can one of the admins verify this patch?

Can one of the admins verify this patch?

@foxish

ok to test

Test build #90033 has started for PR 21202 at commit 3e410cd.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution/2796/
Test PASSed.

Merged build finished. Test PASSed.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/testing-k8s-prb-spark-integration/2727/

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/testing-k8s-prb-spark-integration/2727/

Test build #90033 has finished for PR 21202 at commit 3e410cd.

This patch fails due to an unknown error code, -9.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/90033/
Test FAILed.

This patch fails due to an unknown error code, -9.

I don't see any failures related to the change, can you trigger the test again?

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution/3012/
Test PASSed.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/testing-k8s-prb-spark-integration/2929/

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/testing-k8s-prb-spark-integration/2929/

Can one of the admins verify this patch?

ok to test

@devaraj-kavali could you rebase this?

Test build #91647 has started for PR 21202 at commit 3e410cd.

Test build #91647 has finished for PR 21202 at commit 3e410cd.

This patch fails Spark unit tests.
This patch does not merge cleanly.
This patch adds no public classes.

Build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/91647/
Test FAILed.

Test build #92701 has started for PR 21202 at commit 9c5271d.

Test build #92701 has finished for PR 21202 at commit 9c5271d.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

@devaraj-kavali @skonto just checking this is still something that should be merged, ready to go?

@srowen this issue still exists and needs to be merged.

Merged to master


Avoid warnings about int-to-pointer conversions in DB2 backend.

These warnings are harmless as the cast to pointer needs to be used just
because SQLSetStmtAttr() is "polymorphic" and takes both pointers and
integers, but annoying, so avoid them by using a helper cast-like function.

Looks OK.
AFAIR from most of ODBC drivers I've seen, in SQL_ATTR_ROW_ARRAY_SIZE case, SQLSetStmtAttr casts it back to SQLINTEGER or SQLBIGINT.

I actually don't understand why I don't get the same warnings for ODBC... Maybe the ODBC headers define SQLPOINTER differently?

AFAIU, SQLSetStmtAttr signature should be exactly the same in both. Perhaps ODBC headers disable that warning.

OK, I solved the mystery: the warning is given in DB2 code when casting from (32 bit) int to (64 bit) SQLPOINTER, but not in ODBC code because it casts from SQLULEN which is also 64 bit.
Not sure if it's worth changing the code, I might do it if we run into this warning under some other platform in the future, but for now let's leave it as is.

Right. Indeed, cast to 64-bit integer is what, for instance, SQLite ODBC driver does too:
static SQLRETURN
drvsetstmtattr(SQLHSTMT stmt, SQLINTEGER attr, SQLPOINTER val,
	       SQLINTEGER buflen)
{
    STMT *s = (STMT *) stmt;
#if defined(SQL_BIGINT) && defined(__WORDSIZE) && (__WORDSIZE == 64)
    SQLBIGINT uval;

    uval = (SQLBIGINT) val;
#else
    SQLULEN uval;

    uval = (SQLULEN) val;
#endif
...


How can I get this simple example working?

Describe what you want to achieve.
I want to see a simple example working before integrating into my library. The following code (single file) compiles ok but the json dump is an empty array. It doesn't seem like the to_json and from_json functions are ever being called but I get no warnings or exceptions thrown. How do I modify this code to get something working?

#include <nlohmann/json.hpp>
using nlohmann::json;

#include <string>
#include <iostream>

namespace orchard {

class Apple {
public:
    Apple() {}
    std::string colour;
    int tastiness;
    bool ripe;
};

class AppleTree {
public:
    AppleTree() {}
    double height;
    std::vector<Apple> apples;
};

void to_json(json& j, const Apple& a)
{
    std::cout << "serializing Apple" << std::endl;
    j = json{{"colour", a.colour}, {"tastiness", a.tastiness}, {"ripe", a.ripe}};
}

void from_json(const json& j, Apple& a)
{
    std::cout << "deserializing Apple" << std::endl;
    j.at("colour").get_to(a.colour);
    j.at("tastiness").get_to(a.tastiness);
    j.at("ripe").get_to(a.ripe);
}

void to_json(json& j, const AppleTree& t)
{
    std::cout << "serializing Apple Tree" << std::endl;
    j = json{{"height", t.height}, {"apples", t.apples}};
}

void from_json(const json& j, AppleTree& t)
{
    std::cout << "deserializing Apple Tree" << std::endl;
    j.at("height").get_to(t.height);
    j.at("apples").get_to(t.apples);
}

} // orchard

int main() {

    // Get some data
    std::vector<orchard::AppleTree> trees;
    trees.reserve(2);
    for (uint i=0; i<2; i++) {
        trees[i].height = i+2;
        trees[i].apples.reserve(3);
        for (uint j=0; j<3; j++) {
            trees[i].apples[j].tastiness = static_cast<int>(3*j - j*j);
            trees[i].apples[j].ripe = j > 1;
            trees[i].apples[j].colour = "red";
        }
    }

    // Serialize
    json _json(trees);
    std::string dump = _json.dump();
    std::cout << dump << std::endl;

    // Deserialize
    json _json2 = json::parse(dump);
    auto trees2 = _json2.get<std::vector<orchard::AppleTree>>();

    // Show that it worked
    try {
        std::cout << trees2.at(0).apples.at(0).colour << std::endl;
    } catch (std::out_of_range) {
        std::cout << "didn't work" << std::endl;
    }

    return 0;
}

I am using conan to provide nlohmann_json using this conanfile.txt
[requires]
nlohmann_json/3.7.0

[generators]
cmake_find_package

and my CMakeLists.txt file is simply
cmake_minimum_required(VERSION 3.1)
project(json-muck)

list(APPEND CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR})
find_package(nlohmann_json REQUIRED)

add_executable(muck src/main.cpp)
target_link_libraries(muck nlohmann_json::nlohmann_json)
set_property(TARGET muck PROPERTY CXX_STANDARD 11)

Describe what you tried.
Have tried breaking into separate header file to contain the class and conversion functions and a main file. Have tried using structs instead of classes and providing more constructors as per the instructions.

Describe which system (OS, compiler) you are using.
Ubuntu 18.04, gcc version 9.2.1 20191008

Describe which version of the library you are using (release version, develop branch).
nlohmann_json/3.7.0

Thanks in advance

In case it helps, here is my CMakeLists.txt file
cmake_minimum_required(VERSION 3.1)
project(json-muck)

list(APPEND CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR})
find_package(nlohmann_json REQUIRED)

add_executable(muck src/main.cpp)
target_link_libraries(muck nlohmann_json::nlohmann_json)
set_property(TARGET muck PROPERTY CXX_STANDARD 11)

And my conanfile.txt is simply
[requires]
nlohmann_json/3.7.0

[generators]
cmake_find_package

Thanks in advance

Instead of reserve(), you must do resize() (or reserve() + push_back()). A reserve() on vector only changes the underlying buffer size and doesn't logically increases the size of the vector. Therefore, your vectors are considered empty.  More info on difference between resize() vs. reserve().

Thankyou!


Cannot cast between pointer types

Expected Behaviour
The main branch doesn't throw this error, but after some refactoring in that branch it throws that error
(the main branch already merged the deref-type branch, but it fixes the problem by duplicating all the code in two build targets)
Example & Steps To Reproduce
repo: https://github.com/molikto/graphics-playground/tree/deref-type
run: cargo run -p bosky --release
result in rust-gpu error:
  error: Cannot cast between pointer types
     --> C:\Users\molikto\GitHub\graphics-playground\crates\common-no-std\src\math\svo.rs:180:36
      |
  180 |                 let target_block = self.mem[target_block_index];
      |                                    ^^^^^^^^
      |
      = note: from: *struct common_no_std::svo::Svo<&[u16], 2_u16, 8_usize> { *[u16], u32 }
      = note: to: *struct &[u16] { *[u16], u32 }

System Info

Rust: rustc 1.57.0 (f1edd0429 2021-11-29)
OS: Windows 10
SPIR-V: SPIRV-Tools v2021.4-dev v2021.3-86-g21e3f681

more debugging:
The def_id is different for type pointer cast type checking. Other than that all same
Adt { is_enum: false, id: 6, def_id: Some(DefId(13:146 ~ common_no_std[e39a]::math::svo::Svo)), align: Align { pow2: 2 }, size: Some(Size { raw: 8 }), field_types: [Pointer { id: 4, pointee: RuntimeArray { id: 3, element: Integer { id: 2, width: 16, signedness: false } } }, Integer { id: 5, width: 32, signedness: false }], field_offsets: [Size { raw: 0 }, Size { raw: 4 }], field_names: None }
Adt { is_enum: false, id: 599, def_id: None, align: Align { pow2: 2 }, size: Some(Size { raw: 8 }), field_types: [Pointer { id: 4, pointee: RuntimeArray { id: 3, element: Integer { id: 2, width: 16, signedness: false } } }, Integer { id: 5, width: 32, signedness: false }], field_offsets: [Size { raw: 0 }, Size { raw: 4 }], field_names: None } }


[incubator/kafka] limit Prometheus discovery to release namespace

What this PR does / why we need it:
Service monitor is configured to search for endpoints in all the cluster.
This PR limits the search in the namespace the chart is installed, no need to search in all namespaces.
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

[x] DCO signed
[x] Chart Version bumped
[x] Title of the PR starts with chart name (e.g. [stable/chart])

/assign @benjigoldberg

@sebastien-prudhomme this is a good catch. Thanks for the PR.
/ok-to-test

/lgtm


Bicep VSCode ext suggests a Microsoft.Authorization/policyDefinitions api-version that is not supported by ARM

Bicep version
run bicep --version via the Bicep CLI, az bicep version via the AZ CLI or via VS code by navigating to the extensions tab and searching for Bicep

Describe the bug
Bicep extension intellisense suggests  api-version 2024-05-01 but when executed against ARM the Deployment Engine complains about the version (see below)

To Reproduce
Steps to reproduce the behavior:

Try to deploy a resource of type policyDefinitions to a MG scope with api-version 2024-05-01

param policyDefinitionPolicyRule object
param policyDefinitionPolicyMode string
param policyDefinitionPolicyParameters object

resource policyDefinitionId_resource 'Microsoft.Authorization/policyDefinitions@2024-05-01' = {
  name: policyDefinitionId
  properties: {
    policyType: 'Custom'
    displayName: policyDefinitionDisplayName
    description: policyDefinitionDescription
    mode: policyDefinitionPolicyMode
    policyRule: policyDefinitionPolicyRule
    parameters: policyDefinitionPolicyParameters
  }
}

Additional context

The azure-rest-api-specs defines api-version  2024-05-01 here

Plan is to get this resolved by updating the ARM manifest when the Deployment Freeze lifts at the start of the new year.


update please

with the crystal empire update just in your code might need an update.
if you've got the time, please make it happen :-)

Yeah I'm aware of that, I've been contacted by several people.
Thing is, I don't have much time to do it, as I initially planned to look into it this week end, but as it stands, it seems optimistic.
Rest assured, I will do it, as I don't think the changes are monumental.
Better late than never, right?
I'll keep you updated.

And then it died
Sad to see but maybe one day someone revives it


Consider providing vcpkg binaries in releases

Is your feature request related to a problem? Please describe.
I use GitHub Actions for CI on a private repository, which as I understand it, has a monthly budget of minutes. As such, I'd like to minimise the amount of time any given CI run takes.
I've observed that building vcpkg takes roughly 2-3 minutes, not including building the libraries I wish to install.
Proposed solution
I'd be neat if prebuilt binaries were downloadable with each release, not unlike Ninja. It'd also be cool if a script was provided so that the workflow could be:
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./get-latest-vcpkg-for-ci.sh # downloads whatever the latest binary is and unzips it
./vcpkg install catch2

Describe alternatives you've considered
No alternatives considered (other than a different release cadence), but I'm open to suggestions.

Yes, we are prepare to publish vcpkg binary in the future.
Duplicated to #14995.


import github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1 error

error
github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1
../../../../../../go/pkg/mod/github.com/tektoncd/pipeline@v0.28.2/pkg/apis/pipeline/v1beta1/openapi_generated.go:117:3: cannot use "github.com/go-openapi/spec".Schema{...} (type "github.com/go-openapi/spec".Schema) as type "k8s.io/kube-openapi/pkg/validation/spec".Schema in field value
../../../../../../go/pkg/mod/github.com/tektoncd/pipeline@v0.28.2/pkg/apis/pipeline/v1beta1/openapi_generated.go:146:11: cannot use ref("k8s.io/api/core/v1.Toleration") (type "k8s.io/kube-openapi/pkg/validation/spec".Ref) as type "github.com/go-openapi/spec".Ref in field value
../../../../../../go/pkg/mod/github.com/tektoncd/pipeline@v0.28.2/pkg/apis/pipeline/v1beta1/openapi_generated.go:155:8: cannot use ref("k8s.io/api/core/v1.Affinity") (type "k8s.io/kube-openapi/pkg/validation/spec".Ref) as type "github.com/go-openapi/spec".Ref in field value
../../../../../../go/pkg/mod/github.com/tektoncd/pipeline@v0.28.2/pkg/apis/pipeline/v1beta1/openapi_generated.go:161:8: cannot use ref("k8s.io/api/core/v1.PodSecurityContext") (type "k8s.io/kube-openapi/pkg/validation/spec".Ref) as type "github.com/go-openapi/spec".Ref in field value
../../../../../../go/pkg/mod/github.com/tektoncd/pipeline@v0.28.2/pkg/apis/pipeline/v1beta1/openapi_generated.go:178:11: cannot use ref("k8s.io/api/core/v1.Volume") (type "k8s.io/kube-openapi/pkg/validation/spec".Ref) as type "github.com/go-openapi/spec".Ref in field value
../../../../../../go/pkg/mod/github.com/tektoncd/pipeline@v0.28.2/pkg/apis/pipeline/v1beta1/openapi_generated.go:208:8: cannot use ref("k8s.io/api/core/v1.PodDNSConfig") (type "k8s.io/kube-openapi/pkg/validation/spec".Ref) as type "github.com/go-openapi/spec".Ref in field value
../../../../../../go/pkg/mod/github.com/tektoncd/pipeline@v0.28.2/pkg/apis/pipeline/v1beta1/openapi_generated.go:240:11: cannot use ref("k8s.io/api/core/v1.LocalObjectReference") (type "k8s.io/kube-openapi/pkg/validation/spec".Ref) as type "github.com/go-openapi/spec".Ref in field value
../../../../../../go/pkg/mod/github.com/tektoncd/pipeline@v0.28.2/pkg/apis/pipeline/v1beta1/openapi_generated.go:254:11: cannot use ref("k8s.io/api/core/v1.HostAlias") (type "k8s.io/kube-openapi/pkg/validation/spec".Ref) as type "github.com/go-openapi/spec".Ref in field value
../../../../../../go/pkg/mod/github.com/tektoncd/pipeline@v0.28.2/pkg/apis/pipeline/v1beta1/openapi_generated.go:277:3: cannot use "github.com/go-openapi/spec".Schema{...} (type "github.com/go-openapi/spec".Schema) as type "k8s.io/kube-openapi/pkg/validation/spec".Schema in field value
../../../../../../go/pkg/mod/github.com/tektoncd/pipeline@v0.28.2/pkg/apis/pipeline/v1beta1/openapi_generated.go:320:3: cannot use "github.com/go-openapi/spec".Schema{...} (type "github.com/go-openapi/spec".Schema) as type "k8s.io/kube-openapi/pkg/validation/spec".Schema in field value
../../../../../../go/pkg/mod/github.com/tektoncd/pipeline@v0.28.2/pkg/apis/pipeline/v1beta1/openapi_generated.go:320:3: too many errors

/label triage/needs-information

go version
go version go1.16.7 darwin/amd64
go mod pipeline version
github.com/tektoncd/pipeline v0.28.2

how to fix this?
my cluster is 0.23.0

@ycyxuehan we updated our version of knative in tekton pipelines. Could you try again and see if the problem is fixed for you?

Confirmed this is fixed with the latest version of pipelines + deps:
require (
        github.com/tektoncd/pipeline v0.32.0
        k8s.io/apimachinery v0.23.2
        k8s.io/client-go v0.23.2
)

/close


Is there any way to position right?

In the pure react version you can write  and the menu is put on the Right, on this version seems like  doesn't work.

Yes, that was the problem, thanks.


fix: remove scene id warning

To get rid of this annoying warning
Assets\Mirror\Runtime\NetworkIdentity.cs(183,32): warning CS0649: Field 'NetworkIdentity.m_SceneId' is never assigned to, and will always have its default value 0

I suppressed the warning in 4ef680a47483890d6576784ca880f2b3536b6b7f
I would rather suppress the warning than make the variable public because if we ever want to change it, it would be a breaking change.


Allow the Buffer Finder to search the titles of non-buffer pane items also

From @ptoomey3:
When there are more tabs than screen space, the Buffer Finder (Cmd+B on macOS) becomes a much more important tool for navigating between open files. What @ptoomey3 would like to see is the ability to use the Buffer Finder to navigate between all open tabs, not just buffer tabs. Specifically, their workflow is for going through Project Find search results. For example:

Launch Atom in the local Atom repository
Double click four random files in the Tree View
Open the Project Find panel with Cmd+Shift+F
Type atom in the find box
Press Enter to execute the search
Click a search result
Press Cmd+B to bring up the Buffer Finder

Expected: "Project Find Results" to be at the top of the Buffer Finder list
Actual: "Project Find Results" isn't in the list at all
I recommend that we make this functionality a new command that people can replace the current Buffer Finder keybinding with if they prefer this functionality. Or they can perhaps use Cmd+Shift+B for this alternate functionality.

I recommend that we make this functionality a new command that people can replace the current Buffer Finder keybinding with if they prefer this functionality. Or they can perhaps use Cmd+Shift+B for this alternate functionality.

I don't have a strong preference here. Whether it is simply a config option within fuzzy-finder or something I have to remap seems fine. In the end I'd just love to have Cmd-B show a stack of all my open tabs :smile:.


Remove saving configure output

It's unnecessary. We almost never use this trick in other recipes.

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

Hi @ccordoba12 - this doesn't actually save the config log, also there is no harm in keeping it since that block won't be executed unless the config fails.
Also, could you please merge from master and bump the build number?

Though we didn't start building on CIs until recently. 😉
This line is really helpful when configure fails and doesn't tell you what is going on. If a maintainer doesn't have a Mac, having this step dumps the log into Travis CI so we can at least take a look.

having this step dumps the log into Travis CI so we can at least take a look

Is not the configure output shown directly in Travis? I don't understand how this could be different in this case :-)

I can clearly see it here:
https://travis-ci.org/conda-forge/glib-feedstock/jobs/129010559#L448

Is not the configure output shown directly in Travis? I don't understand how this could be different in this case :-)

Yes, and it then says something horrible went wrong look at config.log and crashes. So, much fun and mystery. 😜
This will at least show us the contents of this file. Honestly, I have been debating just recommending this a standard practice after @scopatz started doing it.

Right, when configure works correctly, there is no need to see that file hence ||. When it fails, configure doesn't tend to be very informative. So, we to look at config.log to see what went wrong.

Ok, I'll restore it but leave the \ markers. Should I bump the build number then?

Should I bump the build number then?

I don't think it it is necessary. We aren't changing the final build product really.

Also, please remember to fork and push your changes to your fork in the future. Any branch on the main repo auto deploys if it builds successfully.

Ok, now I understand what's happening: we are dumping config.log to the CIs output on failure :-)

please remember to fork and push your changes to your fork in the future. Any branch on the main repo auto deploys if it builds successfully.

Ok, didn't know that. But I think it should be better to work on repo branches so that maintainers can easily share work and pick up things when others got busy and can't continue working on something.

Ok, didn't know that.

It's fair. We need to document this stuff better.

But I think it should be better to work on repo branches so that maintainers can easily share work and pick up things when others got busy and can't continue working on something.

Totally agree. This feature really messes people up and it isn't so commonly used. That's why I added this issue ( https://github.com/conda-forge/conda-forge.github.io/issues/87 ). Though I don't think anyone (including myself) has had time to work on it.

This will at least show us the contents of this file. Honestly, I have been debating just recommending this a standard practice after @scopatz started doing it.

@jakirkham always glad to add to the best practices :)

I'm already putting it to use, @scopatz.

LGTM. Thoughts @scopatz?

yep lgt. feel free to merge @jakirkham

Thanks. Done.


Getting swagger syntax error in FeatureFlag Controller

While running the backend in dev, I came across this swagger syntax error in backend.

Ben will fold this into other changes he's making in the swagger for automated testing.

QA: passed


feat: support autoclass

Fixes https://github.com/googleapis/nodejs-storage/issues/2053
This should not be merged until the Cloud Storage backend releases the feature.
Go ahead is required from @cojenco before merging.

@cojenco has approved merging


Fixes a syntax error

Just noticed I made a silly mistake in the last pull request sigh
Maybe you should take a serious look into pull requests before merging x)
Edit: Also added a commit that fixes missing quotes in the gamemode's txt file. Strangely, no one complained about this so far.

I read the stuff it looked good, I trust people test their code before pr :p merged.

Yeah, I tested before requesting this second pull, so it should work now. Sorry for the circumstances :grin:
The way this map-specific lua file is loaded is kinda static and not as sexy as your resourceLoader, but rewriting your loader and loading this file with it ended up being too slow and not really efficient. So maybe I come up with a better solution though.

No worries, solution looks good to me :)


Bug: wxBitmapComboBox does not drop down correctly in wxUiTesting

Description:

The test code adds two entries of string+bitmaps, but the dropdown doesn't work. The strings and bitmaps will display if you can get to them, so it appears to be an issue with the dropdown portion. wxWidgets version 3.1.3.

These needs to be fixed for 1.1 since it will also affect all three of the new languages we will be supporting.

This is in the CommonCtrls dialog in python_tests (currently, only created in C++). The OnInit method adds two strings+bitmaps, and the dropdown box works fine (wxWidgets 3.2.0). It's possible given how old this bug report is that the issue was wxWidgets 3.1.3, but since it seems to work fine now, I'm closing this.


chore: test transform

tob.$transform = (tob.transformOptions.module ? transformModule : transformScript)(tob.input, tob.transformOptions.transformers, tob.transformOptions);

I was confused by the transform. why it needs 2 arguments (2nd transformOptions.transformers, 3rd tob.transformOptions)??

The transformer api is transformScrip(ast, [], options);
tob.transformOptions.transformers is the array in the options. Second arg of the function illustrated above.
tob.transformOptions is the regular parser options like you do while normal parsing
Need to change this somehow - the transformer API, for what if the transformers in the array doesn't exist?

@aladdin-add any progress? I'm currently in a huge refactoring. I'm not sure how long it will take, but I'm ditching Typescript out the door and writing my own type system to gain perf. It will work on top of existing ECMA ofc.

@aladdin-add How would we test something like this
const ast = parseScript('const a: string = "2"');

const input = createTypeContainer(ast);
const whatWeWant = { type: Type("string"), parent: input };
// the 'body' of actual is 'a' and should be equal to 'whatWeWant'

consider adding a new item in this line?
https://github.com/kataw/kataw/blob/efc2f86fa649659fa4babc6a2ffcff5129b840fb/test/runner/tob.ts#L54-L58

Not for now. First I need the typesystem working :) Is the PR okay now, and ready so you can merge it?

@aladdin-add Off topic. Bitwise masks, are you okay with them? Or plain enums as seen in this image is ok?

looks good!

Can this PR be merged?

not yet, the current snapshots need to be updated.

You can't update them?

after the refactor, the parser options and printer options need to be added in every md files. - if not given, the cst and printer output will not be generated.
any ideas how to update?

I think you need to do it manually 👍
Seriously. In my locale code I didn't "force" options to be in every .md file. Why not do "if options exist" else ignore.

no parser options means you do not want to testing parsing. so you will need to put something there (e.g. default options {})
👍 I agreed there is a room to improve.

@aladdin-add  This '.md' file looks messy again. 2x  options under each other?  One line of options only is much nicer. And if printer mixed into this, use separate .md template for printed output
https://github.com/kataw/kataw/blob/325f24a19ae54f9e67150949e2297b15064c730d/test/__snapshot__/compiler/error-recovery/array-lit-assign.md

and this field 'Diagnostics Output' should show 'No Errors'. Let say there is no printer, then you can do
' if (x.diagnostics.length === 0) 'No Errors else list out each diagnostic on a new line under each other'
same if there is printer
That way we will know if there are errors

I fixed only one set of options like this '{printer: true, OPTIONS }'
if "printer === true" then i means a new template only for printer. Or "transform === true" etc. If not printer or transform, it's  parsing

@aladdin-add Ready to be merged?
BTW. Did you read the technical info I wrote in the private repo? Maybe relevant for further testing...

@aladdin-add friendly ping

'(node:13900) Warning: No such label 'Whole test run' for console.timeEnd()'

please reopen https://github.com/kataw/kataw/issues/30 , if you still see this warning.
btw, it's just a warning, and it does not block anything. :)

Soon ready to be merged?

IMHO, this is ready to be merged, if you don't mind the "messy" md files.
to me, it's not a very big deal. to support a "no messy" options, you can just parse the one option to 3 options.
e.g.
options: {printer: true, parser: true, transform: true, ...}

=>
parserOptions: {},
printerOptions: {},
transformOptions: {}

The funny  thing here is that I always ending up writing test code as the option and it will throw errors. It's too much options in one file, so I had hard to find the input block.
And everytime I do that mistake (happens 9 out of 10 times) it throws that i can't slice the options. Maybe need a fix?

@aladdin-add what about factoring out the printer into it's own .md file so it's not part of the parser test .md`?

@aladdin-add friendly ping

👍 good direction! if you want a "no messy options", do not mix the options to one.
so I'm going to close the PR - it has been too far than I firstly imagined. :)

How we solve this?


Ssv Normany bug

#141

Improved SSV Normandy plugin integration.

Colors actually change when switching to themes that are not Monika.

[ ] Works on MacOS

[ ] Works on Windows

[ ] Make darker secondary color.

Go Flight.


the Hyper-parameters of the Classification Net

Hi,
we use the default parameters of PRM (https://github.com/ZhouYanzhao/PRM/blob/pytorch/demo/config.yml) to train the classification network, (change the train_splits from trainval to trianaug, of course). However, the quality of the results we got are slightly worse than that of the points in 'datasets/prm_point_dict.json'.
Therefore, could you share your hyper-parameter setting of classification net?
By the way, we have tried several times, but can't acheive the performance reported in PRM* (mAP50: 26.8). only get 11.5 mAP50 with MCG proposals and 21.5 mAP50 with COB proposals.
Have you ever repoduced their work successfully? could you give some advices to us?
Thanks a lot.
*Zhou, Yanzhao, et al. "Weakly supervised instance segmentation using class peak response." Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. 2018.

The file I used is https://github.com/ElementAI/wise_ils/blob/master/models/prm.py for training prm. I used the PRM class and the PRMLoss function to compute the loss.

I remember having the same difficulty reproducing those results. Perhaps you could ask them in their Github repo?

Best!

I will upload the pretrained PRM model soon.

you welcome! :)


Support text and comment nodes in html pretty printing

Summary
A failing test for the new HTML pretty format plugin.
The failure looks like this:

Test plan
Well, the bug needs to be fixed first 😀
/cc @mute

It's an issue with children. Run this in the console in e.g. chrome:
const parent = document.createElement('div');
parent.innerHTLM = 'some text';

parent.children
// > [span]
parent.childNodes
// [text, span]

That said, just swapping children for childNodes gives me RangeError: Invalid string length

Got it working, PTAL

Updated the PR to also print comment nodes

Codecov Report

Merging #3355 into master will increase coverage by 0.03%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #3355      +/-   ##
==========================================
+ Coverage   64.93%   64.96%   +0.03%
==========================================
  Files         176      176
  Lines        6514     6520       +6
  Branches        4        4
==========================================
+ Hits         4230     4236       +6
  Misses       2283     2283
  Partials        1        1

Impacted Files
Coverage Δ

packages/pretty-format/src/plugins/HTMLElement.js
97.22% <100%> (+0.55%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a9288e4...8f28ae5. Read the comment docs.

This is great Simen! I fixed it up a bit and addressed the instanceof checks and made custom types for them.


Installation on Linux fails because /usr/share/ollama does not exist.

What is the issue?
When you install using the install script on openSUSE Tumbleweed, the script fails because the adduser command with the -m does not create the directory /usr/share/ollama, it merely assigns that directory to the ollama user.
I had Claude Sonnet go over the install script line by line explaining to me what it does. Here is what Claude has to say about that line in response to this query: Correct me if I'm wrong, but this line here: $SUDO useradd -r -s /bin/false -U -m -d /usr/share/ollama ollama creates the account with the home directory at /usr/share/ollams. Where in the script is that directory created?
Claude Sonnet:
Claude 3.5 Sonnet
You're absolutely correct, and I apologize for the oversight in my previous explanation. You've made a very astute observation. Let's clarify this:
The line you mentioned:
bash
Copy code
$SUDO useradd -r -s /bin/false -U -m -d /usr/share/ollama ollama
Indeed creates the 'ollama' user with the home directory set to /usr/share/ollama.
You're right to question where this directory is created. In the original script, there isn't an explicit command to create this directory. The -m option in the useradd command is supposed to create the home directory if it doesn't exist, but it's generally a good practice to ensure the parent directory exists.
To improve this, we should add a line to create the directory before creating the user. Here's how we could modify that section:
bash
Copy code
if ! id ollama >/dev/null 2>&1; then
status "Creating ollama user..."
$SUDO mkdir -p /usr/share/ollama
$SUDO useradd -r -s /bin/false -U -m -d /usr/share/ollama ollama
fi
This change ensures that the /usr/share/ollama directory exists before we try to create the user with that home directory.
Thank you for catching this. It's an important detail that could potentially cause issues if the parent directory /usr/share didn't exist or wasn't writable. Your attention to detail helps improve the robustness of the script.
OS
Linux
GPU
AMD
CPU
AMD
Ollama version
v0.2.5

By the way here is the result of the latest script on openSUSE Tumbleweed:
`rhack@localhost:/Data2/Work> curl -fsSL https://ollama.com/install.sh | sh

Downloading ollama...
######################################################################## 100.0%#=#=#
Installing ollama to /usr/local/bin...
[sudo] password for root:
Adding ollama user to render group...
Adding ollama user to video group...
Adding current user to ollama group...
Creating ollama systemd service...
Enabling and starting ollama service...
Downloading AMD GPU dependencies...
chmod: cannot access '/usr/share/ollama': No such file or directory
rhack@localhost:/Data2/Work>
`

This is what happens after inserting the corrected create directory line in the script and re-executing:
rhack@localhost:/Data2/Work> sudo ./install.sh

Downloading ollama...
######################################################################################################################################################################################################################################################### 100.0%#=#=-  #      ######################################################################################################################################################################################################################################################### 100.0%
Installing ollama to /usr/bin...
Adding ollama user to render group...
Adding ollama user to video group...
Adding current user to ollama group...
Creating ollama systemd service...
Enabling and starting ollama service...
Downloading AMD GPU dependencies...
chmod: cannot access '/usr/share/ollama': No such file or directory

The problem, it turns out, is that /usr/share/ollama is also referred to in the AMD GPU installation section of the script. Here is is my interaction with Claude on that issue:
However, it appears that where the script fails is not in the create user section, but in the AMD GPU section here:status "Downloading AMD GPU dependencies..."
$SUDO rm -rf /usr/share/ollama/lib
$SUDO chmod o+x /usr/share/ollama
$SUDO install -o ollama -g ollama -m 755 -d /usr/share/ollama/lib/rocm
curl --fail --show-error --location --progress-bar "https://ollama.com/download/ollama-linux-amd64-rocm.tgz${VER_PARAM}"
| $SUDO tar zx --owner ollama --group ollama -C /usr/share/ollama/lib/rocm .
install_success
status "AMD GPU ready."
exit 0
Claude 3.5 Sonnet
Thank you for this clarification. You're right, and I apologize for not catching this earlier. The issue is indeed in the AMD GPU section. Let's analyze and fix this part:
bash
Copy code
status "Downloading AMD GPU dependencies..."
$SUDO rm -rf /usr/share/ollama/lib
$SUDO chmod o+x /usr/share/ollama
$SUDO install -o ollama -g ollama -m 755 -d /usr/share/ollama/lib/rocm
curl --fail --show-error --location --progress-bar "https://ollama.com/download/ollama-linux-amd64-rocm.tgz${VER_PARAM}"
| $SUDO tar zx --owner ollama --group ollama -C /usr/share/ollama/lib/rocm .
The problem here is that this section assumes /usr/share/ollama already exists, which may not be the case. To fix this, we need to ensure the directory exists before performing operations on it. Here's a modified version:
bash
Copy code
status "Downloading AMD GPU dependencies..."
$SUDO mkdir -p /usr/share/ollama
$SUDO chown root:root /usr/share/ollama
$SUDO chmod 755 /usr/share/ollama
$SUDO rm -rf /usr/share/ollama/lib
$SUDO chmod o+x /usr/share/ollama
$SUDO install -o ollama -g ollama -m 755 -d /usr/share/ollama/lib/rocm
curl --fail --show-error --location --progress-bar "https://ollama.com/download/ollama-linux-amd64-rocm.tgz${VER_PARAM}"
| $SUDO tar zx --owner ollama --group ollama -C /usr/share/ollama/lib/rocm .
This modification:
Creates the /usr/share/ollama directory if it doesn't exist.
Sets the correct ownership and permissions for this directory.
Then proceeds with the original operations.
Additionally, to make the script more robust, you might want to add checks before each operation:
bash
Copy code
status "Downloading AMD GPU dependencies..."
$SUDO mkdir -p /usr/share/ollama || error "Failed to create /usr/share/ollama"
$SUDO chown root:root /usr/share/ollama || error "Failed to set ownership of /usr/share/ollama"
$SUDO chmod 755 /usr/share/ollama || error "Failed to set permissions for /usr/share/ollama"
$SUDO rm -rf /usr/share/ollama/lib || error "Failed to remove /usr/share/ollama/lib"
$SUDO chmod o+x /usr/share/ollama || error "Failed to set execute permissions for /usr/share/ollama"
$SUDO install -o ollama -g ollama -m 755 -d /usr/share/ollama/lib/rocm || error "Failed to create /usr/share/ollama/lib/rocm"
curl --fail --show-error --location --progress-bar "https://ollama.com/download/ollama-linux-amd64-rocm.tgz${VER_PARAM}"
| $SUDO tar zx --owner ollama --group ollama -C /usr/share/ollama/lib/rocm . || error "Failed to download and extract AMD GPU dependencies"
These changes should resolve the issue with the AMD GPU section. If you're still encountering problems, it would be helpful to know any specific error messages you're seeing.
You
It seems to me that I can not do this line: $SUDO mkdir -p /usr/share/ollama in two different places in the script, since the directory may have been created earlier in the script, such as when the ollama user was created. How can we fix this?
Claude 3.5 Sonnet
You're absolutely right, and that's a great observation. We should indeed avoid redundant operations and potential conflicts. Here's how we can improve the script to handle this more efficiently:
First, let's create a function to ensure the /usr/share/ollama directory exists and has the correct permissions. We'll put this near the beginning of the script:
bash
Copy code
ensure_ollama_dir() {
if [ ! -d "/usr/share/ollama" ]; then
status "Creating Ollama directory..."
$SUDO mkdir -p /usr/share/ollama || error "Failed to create /usr/share/ollama"
fi
$SUDO chown root:root /usr/share/ollama || error "Failed to set ownership of /usr/share/ollama"
$SUDO chmod 755 /usr/share/ollama || error "Failed to set permissions for /usr/share/ollama"
}
Now, we'll call this function before creating the user:
bash
Copy code
if ! id ollama >/dev/null 2>&1; then
status "Creating ollama user..."
ensure_ollama_dir
$SUDO useradd -r -s /bin/false -U -m -d /usr/share/ollama ollama
fi
In the AMD GPU section, we'll call the function again instead of recreating the directory:
bash
Copy code
status "Downloading AMD GPU dependencies..."
ensure_ollama_dir
$SUDO rm -rf /usr/share/ollama/lib || error "Failed to remove /usr/share/ollama/lib"
$SUDO chmod o+x /usr/share/ollama || error "Failed to set execute permissions for /usr/share/ollama"
$SUDO install -o ollama -g ollama -m 755 -d /usr/share/ollama/lib/rocm || error "Failed to create /usr/share/ollama/lib/rocm"
curl --fail --show-error --location --progress-bar "https://ollama.com/download/ollama-linux-amd64-rocm.tgz${VER_PARAM}"
| $SUDO tar zx --owner ollama --group ollama -C /usr/share/ollama/lib/rocm . || error "Failed to download and extract AMD GPU dependencies"
This approach has several advantages:
It centralizes the logic for creating and setting up the /usr/share/ollama directory.
It avoids redundant mkdir operations.
It ensures consistent permissions and ownership throughout the script.
If the directory already exists, it will just verify and set the correct permissions without causing any errors.
This modification should resolve the issue of potentially creating the same directory multiple times while ensuring that the directory exists with the correct permissions whenever it's needed in the script.
So I made the necessary modifications and reran the script. This time it ran to completion, installed the ollama binary in /usr/bin/ollama, create the /usr/share/ollama directory and installed the AMD GPU ROCm libraries as well in that directory.

Here is the corrected install script:
`#!/bin/bash
This script installs Ollama on Linux.
It detects the current operating system architecture and installs the appropriate version of Ollama.
set -eu
status() { echo ">>> $" >&2; }
error() { echo "ERROR $"; exit 1; }
warning() { echo "WARNING: $*"; }
TEMP_DIR=$(mktemp -d)
cleanup() { rm -rf $TEMP_DIR; }
trap cleanup EXIT
available() { command -v $1 >/dev/null; }
require() {
local MISSING=''
for TOOL in $*; do
if ! available $TOOL; then
MISSING="$MISSING $TOOL"
fi
done
echo $MISSING

}
[ "$(uname -s)" = "Linux" ] || error 'This script is intended to run on Linux only.'
ARCH=$(uname -m)
case "$ARCH" in
x86_64) ARCH="amd64" ;;
aarch64|arm64) ARCH="arm64" ;;
*) error "Unsupported architecture: $ARCH" ;;
esac
IS_WSL2=false
KERN=$(uname -r)
case "$KERN" in
icrosoftWSL2 | icrosoftwsl2) IS_WSL2=true;;
*icrosoft) error "Microsoft WSL1 is not currently supported. Please upgrade to WSL2 with 'wsl --set-version  2'" ;;
*) ;;
esac
VER_PARAM="${OLLAMA_VERSION:+?version=$OLLAMA_VERSION}"
SUDO=
if [ "$(id -u)" -ne 0 ]; then
# Running as root, no need for sudo
if ! available sudo; then
error "This script requires superuser permissions. Please re-run as root."
fi
SUDO="sudo"

fi
NEEDS=$(require curl awk grep sed tee xargs)
if [ -n "$NEEDS" ]; then
status "ERROR: The following tools are required but missing:"
for NEED in $NEEDS; do
echo "  - $NEED"
done
exit 1
fi
status "Downloading ollama..."
curl --fail --show-error --location --progress-bar -o $TEMP_DIR/ollama "https://ollama.com/download/ollama-linux-${ARCH}${VER_PARAM}"
for BINDIR in /usr/local/bin /usr/bin /bin; do
echo $PATH | grep -q $BINDIR && break || continue
done
status "Installing ollama to $BINDIR..."
$SUDO install -o0 -g0 -m755 -d $BINDIR
$SUDO install -o0 -g0 -m755 $TEMP_DIR/ollama $BINDIR/ollama
install_success() {
status 'The Ollama API is now available at <IP_ADDRESS>:11434.'
status 'Install complete. Run "ollama" from the command line.'
}
trap install_success EXIT
Everything from this point onwards is optional.
#This function ensures that the /usr/share/ollama directory is created before it's referenced further in the script.
ensure_ollama_dir() {
if [ ! -d "/usr/share/ollama" ]; then
status "Creating Ollama directory..."
$SUDO mkdir -p /usr/share/ollama || error "Failed to create /usr/share/ollama"
fi
$SUDO chown root:root /usr/share/ollama || error "Failed to set ownership of /usr/share/ollama"
$SUDO chmod 755 /usr/share/ollama || error "Failed to set permissions for /usr/share/ollama"
}
configure_systemd() {
if ! id ollama >/dev/null 2>&1; then
status "Creating ollama user..."
ensure_ollama_dir
$SUDO useradd -r -s /bin/false -U -d /usr/share/ollama ollama
$SUDO chown ollama:ollama /usr/share/ollama
fi
if getent group render >/dev/null 2>&1; then
status "Adding ollama user to render group..."
$SUDO usermod -a -G render ollama
fi
if getent group video >/dev/null 2>&1; then
status "Adding ollama user to video group..."
$SUDO usermod -a -G video ollama
fi
status "Adding current user to ollama group..."
$SUDO usermod -a -G ollama $(whoami)

status "Creating ollama systemd service..."
cat <<EOF | $SUDO tee /etc/systemd/system/ollama.service >/dev/null

[Unit]
Description=Ollama Service
After=network-online.target
[Service]
ExecStart=$BINDIR/ollama serve
User=ollama
Group=ollama
Restart=always
RestartSec=3
Environment="PATH=$PATH"
[Install]
WantedBy=default.target
EOF
SYSTEMCTL_RUNNING="$(systemctl is-system-running || true)"
case $SYSTEMCTL_RUNNING in
running|degraded)
status "Enabling and starting ollama service..."
$SUDO systemctl daemon-reload
$SUDO systemctl enable ollama
        start_service() { $SUDO systemctl restart ollama; }
        trap start_service EXIT
        ;;
esac

}
if available systemctl; then
configure_systemd
fi
WSL2 only supports GPUs via nvidia passthrough
so check for nvidia-smi to determine if GPU is available
if [ "$IS_WSL2" = true ]; then
if available nvidia-smi && [ -n "$(nvidia-smi | grep -o "CUDA Version: [0-9].[0-9]")" ]; then
status "Nvidia GPU detected."
fi
install_success
exit 0
fi
Install GPU dependencies on Linux
if ! available lspci && ! available lshw; then
warning "Unable to detect NVIDIA/AMD GPU. Install lspci or lshw to automatically detect and install GPU dependencies."
exit 0
fi
check_gpu() {
# Look for devices based on vendor ID for NVIDIA and AMD
case $1 in
lspci)
case $2 in
nvidia) available lspci && lspci -d '10de:' | grep -q 'NVIDIA' || return 1 ;;
amdgpu) available lspci && lspci -d '1002:' | grep -q 'AMD' || return 1 ;;
esac ;;
lshw)
case $2 in
nvidia) available lshw && $SUDO lshw -c display -numeric -disable network | grep -q 'vendor: .* [10DE]' || return 1 ;;
amdgpu) available lshw && $SUDO lshw -c display -numeric -disable network | grep -q 'vendor: .* [1002]' || return 1 ;;
esac ;;
nvidia-smi) available nvidia-smi || return 1 ;;
esac
}
if check_gpu nvidia-smi; then
status "NVIDIA GPU installed."
exit 0
fi
if ! check_gpu lspci nvidia && ! check_gpu lshw nvidia && ! check_gpu lspci amdgpu && ! check_gpu lshw amdgpu; then
install_success
warning "No NVIDIA/AMD GPU detected. Ollama will run in CPU-only mode."
exit 0
fi
if check_gpu lspci amdgpu || check_gpu lshw amdgpu; then
# Look for pre-existing ROCm v6 before downloading the dependencies
for search in "${HIP_PATH:-''}" "${ROCM_PATH:-''}" "/opt/rocm" "/usr/lib64"; do
if [ -n "${search}" ] && [ -e "${search}/libhipblas.so.2" -o -e "${search}/lib/libhipblas.so.2" ]; then
status "Compatible AMD GPU ROCm library detected at ${search}"
install_success
exit 0
fi
done
status "Downloading AMD GPU dependencies..."
ensure_ollama_dir
$SUDO rm -rf /usr/share/ollama/lib
$SUDO chmod o+x /usr/share/ollama
$SUDO install -o ollama -g ollama -m 755 -d /usr/share/ollama/lib/rocm
curl --fail --show-error --location --progress-bar "https://ollama.com/download/ollama-linux-amd64-rocm.tgz${VER_PARAM}" \
    | $SUDO tar zx --owner ollama --group ollama -C /usr/share/ollama/lib/rocm .
install_success
status "AMD GPU ready."
exit 0

fi
ref: https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#rhel-7-centos-7
ref: https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#rhel-8-rocky-8
ref: https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#rhel-9-rocky-9
ref: https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#fedora
install_cuda_driver_yum() {
status 'Installing NVIDIA repository...'
case $PACKAGE_MANAGER in
yum)
$SUDO $PACKAGE_MANAGER -y install yum-utils
$SUDO $PACKAGE_MANAGER-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/$1$2/$(uname -m)/cuda-$1$2.repo
;;
dnf)
$SUDO $PACKAGE_MANAGER config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/$1$2/$(uname -m)/cuda-$1$2.repo
;;
esac
case $1 in
    rhel)
        status 'Installing EPEL repository...'
        # EPEL is required for third-party dependencies such as dkms and libvdpau
        $SUDO $PACKAGE_MANAGER -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-$2.noarch.rpm || true
        ;;
esac

status 'Installing CUDA driver...'

if [ "$1" = 'centos' ] || [ "$1$2" = 'rhel7' ]; then
    $SUDO $PACKAGE_MANAGER -y install nvidia-driver-latest-dkms
fi

$SUDO $PACKAGE_MANAGER -y install cuda-drivers

}
ref: https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#ubuntu
ref: https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#debian
install_cuda_driver_apt() {
status 'Installing NVIDIA repository...'
curl -fsSL -o $TEMP_DIR/cuda-keyring.deb https://developer.download.nvidia.com/compute/cuda/repos/$1$2/$(uname -m)/cuda-keyring_1.1-1_all.deb
case $1 in
    debian)
        status 'Enabling contrib sources...'
        $SUDO sed 's/main/contrib/' < /etc/apt/sources.list | $SUDO tee /etc/apt/sources.list.d/contrib.list > /dev/null
        if [ -f "/etc/apt/sources.list.d/debian.sources" ]; then
            $SUDO sed 's/main/contrib/' < /etc/apt/sources.list.d/debian.sources | $SUDO tee /etc/apt/sources.list.d/contrib.sources > /dev/null
        fi
        ;;
esac

status 'Installing CUDA driver...'
$SUDO dpkg -i $TEMP_DIR/cuda-keyring.deb
$SUDO apt-get update

[ -n "$SUDO" ] && SUDO_E="$SUDO -E" || SUDO_E=
DEBIAN_FRONTEND=noninteractive $SUDO_E apt-get -y install cuda-drivers -q

}
if [ ! -f "/etc/os-release" ]; then
error "Unknown distribution. Skipping CUDA installation."
fi
. /etc/os-release
OS_NAME=$ID
OS_VERSION=$VERSION_ID
PACKAGE_MANAGER=
for PACKAGE_MANAGER in dnf yum apt-get; do
if available $PACKAGE_MANAGER; then
break
fi
done
if [ -z "$PACKAGE_MANAGER" ]; then
error "Unknown package manager. Skipping CUDA installation."
fi
if ! check_gpu nvidia-smi || [ -z "$(nvidia-smi | grep -o "CUDA Version: [0-9].[0-9]")" ]; then
case $OS_NAME in
centos|rhel) install_cuda_driver_yum 'rhel' $(echo $OS_VERSION | cut -d '.' -f 1) ;;
rocky) install_cuda_driver_yum 'rhel' $(echo $OS_VERSION | cut -c1) ;;
fedora) [ $OS_VERSION -lt '39' ] && install_cuda_driver_yum $OS_NAME $OS_VERSION || install_cuda_driver_yum $OS_NAME '39';;
amzn) install_cuda_driver_yum 'fedora' '37' ;;
debian) install_cuda_driver_apt $OS_NAME $OS_VERSION ;;
ubuntu) install_cuda_driver_apt $OS_NAME $(echo $OS_VERSION | sed 's/.//') ;;
*) exit ;;
esac
fi
if ! lsmod | grep -q nvidia || ! lsmod | grep -q nvidia_uvm; then
KERNEL_RELEASE="$(uname -r)"
case $OS_NAME in
rocky) $SUDO $PACKAGE_MANAGER -y install kernel-devel kernel-headers ;;
centos|rhel|amzn) $SUDO $PACKAGE_MANAGER -y install kernel-devel-$KERNEL_RELEASE kernel-headers-$KERNEL_RELEASE ;;
fedora) $SUDO $PACKAGE_MANAGER -y install kernel-devel-$KERNEL_RELEASE ;;
debian|ubuntu) $SUDO apt-get -y install linux-headers-$KERNEL_RELEASE ;;
*) exit ;;
esac
NVIDIA_CUDA_VERSION=$($SUDO dkms status | awk -F: '/added/ { print $1 }')
if [ -n "$NVIDIA_CUDA_VERSION" ]; then
    $SUDO dkms install $NVIDIA_CUDA_VERSION
fi

if lsmod | grep -q nouveau; then
    status 'Reboot to complete NVIDIA CUDA driver install.'
    exit 0
fi

$SUDO modprobe nvidia
$SUDO modprobe nvidia_uvm

fi
make sure the NVIDIA modules are loaded on boot with nvidia-persistenced
if command -v nvidia-persistenced > /dev/null 2>&1; then
$SUDO touch /etc/modules-load.d/nvidia.conf
MODULES="nvidia nvidia-uvm"
for MODULE in $MODULES; do
if ! grep -qxF "$MODULE" /etc/modules-load.d/nvidia.conf; then
echo "$MODULE" | sudo tee -a /etc/modules-load.d/nvidia.conf > /dev/null
fi
done
fi
status "NVIDIA GPU ready."
install_success
`

One note: replace the /bin/bash with /bin/sh as in the original script. Not everyone uses bash. I changed it for my use case.

Huge thanks,
I had the exact same issue trying to install it on Fedora Linux with an rx 6700xt, i previously had to do the manual install but also had some issue with it not detecting the gpu, this just works and is easy.
Now we just need the changes to be merged.
Thanks again :)
ps: here is the full script that you can just copy and paste for anyone in the future (with some minors changed made by chatgpt (yes i know) since i was unable to actually make it work when i myself copy pasted the above code(probably my fault))
#!/bin/sh
# This script installs Ollama on Linux.
# It detects the current operating system architecture and installs the appropriate version of Ollama.

set -eu

status() { echo ">>> $*" >&2; }
error() { echo "ERROR: $*" >&2; exit 1; }
warning() { echo "WARNING: $*" >&2; }

TEMP_DIR=$(mktemp -d)
cleanup() { rm -rf "$TEMP_DIR"; }
trap cleanup EXIT

available() { command -v "$1" >/dev/null; }
require() {
    MISSING=''
    for TOOL in "$@"; do
        if ! available "$TOOL"; then
            MISSING="$MISSING $TOOL"
        fi
    done
    echo "$MISSING"
}

[ "$(uname -s)" = "Linux" ] || error 'This script is intended to run on Linux only.'

ARCH=$(uname -m)
case "$ARCH" in
    x86_64) ARCH="amd64" ;;
    aarch64|arm64) ARCH="arm64" ;;
    *) error "Unsupported architecture: $ARCH" ;;
esac

IS_WSL2=false
KERN=$(uname -r)
case "$KERN" in
    *icrosoftWSL2 | *icrosoftwsl2) IS_WSL2=true ;;
    *icrosoft) error "Microsoft WSL1 is not currently supported. Please upgrade to WSL2 with 'wsl --set-version 2'" ;;
    *) ;;
esac

VER_PARAM="${OLLAMA_VERSION:+?version=$OLLAMA_VERSION}"

SUDO=
if [ "$(id -u)" -ne 0 ]; then
    if ! available sudo; then
        error "This script requires superuser permissions. Please re-run as root."
    fi
    SUDO="sudo"
fi

NEEDS=$(require curl awk grep sed tee xargs)
if [ -n "$NEEDS" ]; then
    status "ERROR: The following tools are required but missing:"
    for NEED in $NEEDS; do
        echo " - $NEED"
    done
    exit 1
fi

status "Downloading Ollama..."
curl --fail --show-error --location --progress-bar -o "$TEMP_DIR/ollama" "https://ollama.com/download/ollama-linux-${ARCH}${VER_PARAM}"

for BINDIR in /usr/local/bin /usr/bin /bin; do
    echo "$PATH" | grep -q "$BINDIR" && break || continue
done

status "Installing Ollama to $BINDIR..."
$SUDO install -o 0 -g 0 -m 755 -d "$BINDIR"
$SUDO install -o 0 -g 0 -m 755 "$TEMP_DIR/ollama" "$BINDIR/ollama"

install_success() {
    status 'The Ollama API is now available at <IP_ADDRESS>:11434.'
    status 'Install complete. Run "ollama" from the command line.'
}
trap install_success EXIT

ensure_ollama_dir() {
    if [ ! -d "/usr/share/ollama" ]; then
        status "Creating Ollama directory..."
        $SUDO mkdir -p /usr/share/ollama || error "Failed to create /usr/share/ollama"
    fi
    $SUDO chown root:root /usr/share/ollama || error "Failed to set ownership of /usr/share/ollama"
    $SUDO chmod 755 /usr/share/ollama || error "Failed to set permissions for /usr/share/ollama"
}

configure_systemd() {
    if ! id ollama >/dev/null 2>&1; then
        status "Creating ollama user..."
        ensure_ollama_dir
        $SUDO useradd -r -s /bin/false -U -d /usr/share/ollama ollama
        $SUDO chown ollama:ollama /usr/share/ollama
    fi
    if getent group render >/dev/null 2>&1; then
        status "Adding ollama user to render group..."
        $SUDO usermod -a -G render ollama
    fi
    if getent group video >/dev/null 2>&1; then
        status "Adding ollama user to video group..."
        $SUDO usermod -a -G video ollama
    fi

    status "Adding current user to ollama group..."
    $SUDO usermod -a -G ollama "$(whoami)"

    status "Creating ollama systemd service..."
    cat <<EOF | $SUDO tee /etc/systemd/system/ollama.service >/dev/null
[Unit]
Description=Ollama Service
After=network-online.target

[Service]
ExecStart=$BINDIR/ollama serve
User=ollama
Group=ollama
Restart=always
RestartSec=3
Environment="PATH=$PATH"

[Install]
WantedBy=default.target
EOF

    SYSTEMCTL_RUNNING="$(systemctl is-system-running || true)"
    case $SYSTEMCTL_RUNNING in
        running|degraded)
            status "Enabling and starting ollama service..."
            $SUDO systemctl daemon-reload
            $SUDO systemctl enable ollama
            start_service() { $SUDO systemctl restart ollama; }
            trap start_service EXIT
            ;;
    esac
}

if available systemctl; then
    configure_systemd
fi

if [ "$IS_WSL2" = true ]; then
    if available nvidia-smi && [ -n "$(nvidia-smi | grep -o "CUDA Version: [0-9].[0-9]")" ]; then
        status "Nvidia GPU detected."
    fi
    install_success
    exit 0
fi

if ! available lspci && ! available lshw; then
    warning "Unable to detect NVIDIA/AMD GPU. Install lspci or lshw to automatically detect and install GPU dependencies."
    exit 0
fi

check_gpu() {
    case $1 in
        lspci)
            case $2 in
                nvidia) available lspci && lspci -d '10de:' | grep -q 'NVIDIA' || return 1 ;;
                amdgpu) available lspci && lspci -d '1002:' | grep -q 'AMD' || return 1 ;;
            esac
            ;;
        lshw)
            case $2 in
                nvidia) available lshw && $SUDO lshw -c display -numeric -disable network | grep -q 'vendor: .* [10DE]' || return 1 ;;
                amdgpu) available lshw && $SUDO lshw -c display -numeric -disable network | grep -q 'vendor: .* [1002]' || return 1 ;;
            esac
            ;;
        nvidia-smi) available nvidia-smi || return 1 ;;
    esac
}

if check_gpu nvidia-smi; then
    status "NVIDIA GPU installed."
    exit 0
fi

if ! check_gpu lspci nvidia && ! check_gpu lshw nvidia && ! check_gpu lspci amdgpu && ! check_gpu lshw amdgpu; then
    install_success
    warning "No NVIDIA/AMD GPU detected. Ollama will run in CPU-only mode."
    exit 0
fi

if check_gpu lspci amdgpu || check_gpu lshw amdgpu; then
    for search in "${HIP_PATH:-''}" "${ROCM_PATH:-''}" "/opt/rocm" "/usr/lib64"; do
        if [ -n "${search}" ] && [ -e "${search}/libhipblas.so.2" -o -e "${search}/lib/libhipblas.so.2" ]; then
            status "Compatible AMD GPU ROCm library detected at ${search}"
            install_success
            exit 0
        fi
    done

    status "Downloading AMD GPU dependencies..."
    ensure_ollama_dir
    $SUDO rm -rf /usr/share/ollama/lib
    $SUDO chmod o+x /usr/share/ollama
    $SUDO install -o ollama -g ollama -m 755 -d /usr/share/ollama/lib/rocm
    curl --fail --show-error --location --progress-bar "https://ollama.com/download/ollama-linux-amd64-rocm.tgz${VER_PARAM}" \
        | $SUDO tar zx --owner ollama --group ollama -C /usr/share/ollama/lib/rocm .
    install_success
    status "AMD GPU ready."
    exit 0
fi

install_cuda_driver_yum() {
    status 'Installing NVIDIA repository...'
    case $PACKAGE_MANAGER in
        yum)
            $SUDO $PACKAGE_MANAGER -y install yum-utils
            $SUDO $PACKAGE_MANAGER-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/$1$2/$(uname -m)/cuda-$1$2.repo
            ;;
        dnf)
            $SUDO $PACKAGE_MANAGER config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/$1$2/$(uname -m)/cuda-$1$2.repo
            ;;
    esac

    case $1 in
        rhel)
            status 'Installing EPEL repository...'
            $SUDO $PACKAGE_MANAGER -y install https://dl.fedoraproject

i had this problem when installing ollama today.
last month  I didn't have this problem


error when users try to enable compileModules as ember-cli uses esperanto

this seems outdated by now, please reopen if this is still an issue that we need to address.


[Bug]: Can't reach container by dns hostname only IP

Description
I cannot reach my containers by their DNS hostnames or aliases. I use docker compose and have something like:
services:
  postgres-service:

If I run docker inspect I can see the alias and hostnames:
"Aliases": [
    "postgres-service-tg0os8k",
    "postgres-service"
],
"DNSNames": [
    "postgres-service-tg0os8k",
    "postgres-service",
    "6da573b1a2cf"
]

I can also see the IP address and I can successfully ping the container by IP, but I can't reach it through DNS. What gives? "Connect to predefined network" is checked.
Minimal Reproduction (if possible, example repository)
Install coolify and create a container like postgres or redis. SSH into the main VPS and run under root the ping command. Make sure to add it to the coolify network:
networks:
  coolify:
    name: coolify
    external: true

Exception or Error
ping: postgres-service: Name or service not known
Version
v4.0.0-beta.314

Nevermind, I am able to reach the containers from inside other containers who are on the same network but the DNS doesn't work from the main host VPS machine.


add a default view with layout that can be extends by view in module

Add View Layout
Instead of editing display_view that cause incompatibility with other site (https://github.com/OrifInformatique/ci_packbase_v4/pull/57), add a default view that use layout (https://www.codeigniter.com/user_guide/outgoing/view_layouts.html) and must be extended by the views in modules. This change permits to use the view function of CodeIgniter that return a string and permits to have a view with a different header without rewrite all the head.
Example
default.php
The default view with renderSection that will be replaced by what you want when you extend this view. The default view is like an abstract class, it is not supposed to be used without extends
<!DOCTYPE html>

    <?= view('Common\Views\head_content', $this->data) ?>
    <?= $this->renderSection('head') ?>

    <?php if (ENVIRONMENT != 'production'): ?>

CodeIgniter environment variable is set to
        <?=esc(strtoupper(ENVIRONMENT))?> You can change it in .env file.

    <?php endif ?>
    <?= view('Common\Views\login_bar', $this->data) ?>
    <?php foreach (config('Common\Config\AdminPanelConfig')->tabs as $tab) {
            if (strstr(current_url(),$tab['pageLink'])) {
                $textView .= view('\Common\adminMenu');
            }
        }
    ?>
    <?= $this->renderSection('content') ?>
<?= $this->renderSection('javascript') ?>

Note
I put the content of the head in head_content.php to have the same thing between the current header.php and this default view without duplicate the code.
edit_planning.php
The edit planning view extends the default view and defines a section that will be inserted in the default view. There are no error if all sections are not be defined, it is just replaced by nothing.
<?= $this->extend('Common\Views\default') ?>
<?= $this->section('head') ?>
    <?= view('Timbreuse\Views\planning\edit_planning_style') ?>
<?= $this->endSection() ?>
<?= $this->section('content') ?>

<?= esc($h3title) ?>

    <?php if (! empty(service('validation')->getErrors())) : ?>

            <?= service('validation')->listErrors() ?>

    <?php endif ?>
    <form class="grid-container" method="post">

    </form>

<?= $this->endSection() ?>
<?= $this->section('javascript') ?>
    <?= view('Timbreuse\Views\planning\edit_planning_script') ?>
<?= $this->endSection() ?>

Note

I put the content of CSS style in edit_planning_style.php. I don’t use link and CSS file because CSS file must be in the public directory and that avoid having an independent module. This file begins with .
I put the content of JavaScript script in edit_planning_script.php. I don’t use link and JS file because JS file must be in the public directory and that avoid having an independent module. This file begins with .

Call
Use the view function of CodeIgniter.
        return view('Timbreuse\Views\planning\edit_planning.php', $data);

All part will be renderer.

Nous n'allons pas travailler plus loin sur l'amélioration de l'interface graphique avec CodeIgniter car les interface vont être petit à petit refaites en React.


Remove work-around for Chrome proxy settings bug.

Fixes: https://github.com/uProxy/uproxy/issues/777 and https://github.com/uProxy/uproxy/issues/924

So that bug is fixed and in stable version?

In the bug report, they confirmed the fix was in 41.0.2272.63. https://omahaproxy.appspot.com/ shows all OS except iOS are at least 41.0.2272.63.
https://code.google.com/p/chromium/issues/detail?id=448172

We have the minimum version currently set to 41.0.2267, can you bump that up to 2272 if we are relying on it?

good call, done

LGTM


[Enhacement] [Behavior] Bind a Picker to an Enum Directly

I have developed a little behavior for binding a Picker to an instance of an Enum, so the ItemSource of the Picker is automatically created from the enum's Type, and the enum's instance's value is bound to the Picker selected index.
https://github.com/Jose-Develaw/XamarinCommunityToolkit/blob/main/src/CommunityToolkit/Xamarin.CommunityToolkit/Behaviors/PickerBoundToEnumBehavior.shared.cs
Sample:
View:
https://github.com/Jose-Develaw/XamarinCommunityToolkit/blob/main/samples/XCT.Sample/Pages/Behaviors/PickerBoundToEnumBehaviorPage.xaml
ViewModel:
https://github.com/Jose-Develaw/XamarinCommunityToolkit/blob/main/samples/XCT.Sample/ViewModels/Behaviors/PickerBoundToEnumBehaviorViewModel.cs
Does anyone think that this is interesting?

Hi @Jose-Develaw I have created a Converter just for that, it is waiting for approval, please have a look and let me know if it covers your use case 👍

Hi, @GUOLDEV . Maybe I am missing something (correct me if so) but I think your converter only makes half of the work., which is creating the Source for the picker from the Enum.
My behavior also binds the Picker and the Enum's instance, so if the pickers selection changes, the enum's intances in the view model is updated as well. So its not just creating the list, but also binding the picker to the view model's property.
For me its very useful when I need to update the status/type  of some object I got from the server and I have to send that update back to the server.
Take a look to the sample, maybe the code is more self-explanatory.
Thanks in advance for your time! And if you need me to elaborate on this, just let me know.

@GUOLDEV @jfversluis Any comments? Thx


Add emphasis to release notes

This page is at the top of many search results. This "highly recommended" suggestion is buried on the page. Can we make it more prominent?

PS. Sorry for jumping straight to a PR but this is so simple I thought it was not worth opening an issue too.
PPS. I noticed the suggestion of keeping sentences alone on single lines in the guide but I also wanted to change as little as possible...

Cool, yeah, works for me - thanks


unable to create DB revision with clean DB

steps to reproduce:

spin up an empty DB
use basic example script from repo to init DB: PYTHONPATH=. python main.py db init
and use this script to run migrations: PYTHONPATH=. python main.py db upgrade heads
now try to create a simple migration: PYTHONPATH=. python main.py db revision --message "simple migration" --head=data@head

This last step should result in an available migration file, but will result in alembic.util.exc.CommandError: Can't locate revision identified by 'data'.

I think in the core data/schema are mixed.


Errors with the default config if "mpd" isn't installed

Hey !
I installed Waybar yesterday, and I just saw that there are many errors in my sway log (I launch sway with "sway > sway.log 2>&1").
I have this:
[...]
[2019-08-20 13:09:55.631] [error] mpd: Failed to connect to MPD: Connexion refusée
[2019-08-20 13:09:57.631] [error] mpd: Failed to connect to MPD: Connexion refusée
[2019-08-20 13:09:59.631] [error] mpd: Failed to connect to MPD: Connexion refusée
[2019-08-20 13:10:01.631] [error] mpd: Failed to connect to MPD: Connexion refusée
[...]

It happens because mpd is not installed on my computer and because I didn't change a lot the waybar config.
I know that it comes from Waybar because when I kill Waybar, the error doesn't come back.
So, I think that, add mpd as dependency or check if the package exists can be a good fix to avoid this ^^

Just remove the mpd module from the waybar config, if you don't want to use it :)

@Alexays I want to use mpd module but not having mpd running in background all the time, is there a exec-if: "pgrep mpd" in built-in mpd module?


How can we modify the code mainly "AEC" to 48K? Can you give us some direction?

I suggest you change these params:
array_frm_len
cfg_frame_len
AEC_REF_FIX_DELAY
and you can change the FFT length from here

@ shipleyxie
thank you very much，so we do not need to modify "subband_filter_coef" in dios_ssp_share_subband.c?
https://github.com/athena-team/athena-signal/blob/master/athena_signal/kernels/dios_ssp_share/dios_ssp_share_subband.c

@shipleyxie
I modified what you maintioned, and also DELAY_BUFFER_SIZE to make sure it can run.
But the result is poor.
How can I modify it ?


Changes to pre-commit YAML file

Changed git:// to https:// in repo URL since git:// is not supported anymore.
Thanks a lot to @HPC-Ken for helping out :)

Thanks @mmrahorovic and @HPC-Ken !


Vulkan cannot be initialized when using Flatpak

Type
Other
Bug Description
Vulkan can't be initialized when using the flatpak. It seems like is missing the libraries to do so.

[x] I already checked if vulkan worked with the AppImage

Screenshots or videos
https://github.com/flathub/sh.ppy.osu/assets/78992050/e2cd8d87-12c8-4001-8711-3ecd545f2beb
https://github.com/flathub/sh.ppy.osu/assets/78992050/fab11447-619c-41e8-b48d-ecf45faa3b55

Version
2024.412.1.0
Logs:
compressed-logs.zip

(I'm completely aware of this, so I'll wait patiently)
https://github.com/flathub/sh.ppy.osu/pull/171#issuecomment-2053971486

It works now as 2024.625.2!


fix the error of using path as filepath

change path.Join => filepath.Join

Thanks for your contribution @ShuBo6 , we appreciate it :)
We also have a Discord server, which you’re more than welcome to join. It's a great place to connect with fellow contributors and stay updated with the latest developments!


Header validation without corresponding bodies

At the moment we are validating entire blocks at a time by simply applying them to the ledger state. Once we only have headers, we can no longer do that. This means that we'll need additional support from the ledger: it will need to be able to support validation "in the future".

Allowing more time here to define precisely what we need from the ledger layer to support block validation "in the future".

In #401, we added HeaderStateand advanceHeader to validate headers, see a25c388e. Currently, we only have a mock implementation that doesn't actually validate the headers. We still need a real implementation.

We have the right abstractions in place. We don't yet test this in our property tests (created a separate ticket for that at #553). After we merge https://github.com/input-output-hk/ouroboros-network/pull/531 and close #191, we can close this as a separate ticket (provided that we verified that the demo playground still works after the integration, with the real ledger).

Verified that this works as expected in the demo.


Feat: Dedicated help and support page

Describe the feature
I have noticed that there is no help page and no similar open issue. To enhance customer support and address common inquiries, we need to create a dedicated help page on our website. This page should include a frequently asked questions (FAQ) section to provide quick answers to common queries and a complaint/feedback form to gather customer input and improve our services.
Add ScreenShots

Record

[X] I agree to follow this project's Code of Conduct
[X] I have starred the repository
[X] I'm a gssoc-24-extd contributor
[X] I want to work on this issue

Add the link to the page in footer @Sumanbhadra


Proccess videos using ffmpeg and does not save the video to disk

Checklist

[x] I'm asking a question
[ ] I've looked through the README and FAQ for similar questions
[ ] I've searched the bugtracker for similar questions including closed ones

Question

Hi,
I'm using youtube-dl to download videos with external ffmpeg downloader that produce images at the same time. Something like that
youtube-dl --hls-prefer-ffmpeg --fixup warn  --external-downloader ffmpeg --external-downloader-args "-filter_complex \"[0:v]fps=2,crop=in_w/3.84:in_h/21.6:in_w/2.74:in_h/1.43, scale=in_w*2:in_h*2,unsharp=luma_msize_x=7:luma_msize_y=7:luma_amount=2.5[out1];[0:v]fps=2,crop=in_w/2.96:in_h/21.62:in_w/1.58:in_h/5.68, scale=in_w*2:in_h*2,unsharp=luma_msize_x=7:luma_msize_y=7:luma_amount=2.5[out2]\" -map [out1] -map -c:a -q:v 1 C:\\temp\\images\\middle%d.tiff -map [out2] -map -c:a -q:v 1 C:\\temp\\images\\up%d.tiff" --restrict-filenames --skip-unavailable-fragments -o 439815364.mp4 "https://www.twitch.tv/videos/439815364"
I really need only these images and I don't need the final .mp4 file. Is there any option not to save the final video file to disk? I've tried option "--skip-download" with no success it even did not start the downloading process.

Remove it with --exec.

Thanks for the fast response!
I'm trying to avoid consuming a lot of space on a disk. I don't have space on the disk to download the whole video. That's why I'm trying to save only some part of the video in images and don't need the video itself. Your solution will not help the unfortunatly cause at the end I still need space for the whole video.

It seems I've figured out how to do that through pipes.  Here is the final command to do that:
youtube-dl --hls-prefer-ffmpeg -o - "https://www.twitch.tv/videos/439815364" | ffmpeg -i pipe: -filter_complex "[0:v]fps=2,crop=in_w/3.84:in_h/21.6:in_w/2.74:in_h/1.43, scale=in_w*2:in_h*2,unsharp=luma_msize_x=7:luma_msize_y=7:luma_amount=2.5[out1];[0:v]fps=2,crop=in_w/2.96:in_h/21.62:in_w/1.58:in_h/5.68, scale=in_w*2:in_h*2,unsharp=luma_msize_x=7:luma_msize_y=7:luma_amount=2.5[out2]" -map [out1] -map -c:a -q:v 1 C:\temp\images\middle%d.tiff -map [out2] -map -c:a -q:v 1 C:\temp\images\up%d.tiff


macOS?

Looks like some of this should work on max but readme says iOS only

Many features may work on macOS but I haven't tested it yet. This is why I say iOS only. If you find macOS issues let me know.

Got it, thx. I'll start w/ a PR to wrap the files in #if os(iOS) so it can be introduced into a multiplatform project and at least compile

That would be great! Eventually I'd like to test and adjust to support macOS as well.

I've updated the dev branch so it includes #if os(iOS). I still need to test some of the code and update the readme before I can push to main.

macOS support has now been added in 0.5.0! There are a few iOS only elements like AutoRotatingView, TabMenu,WidgetRelativeShape, and SmartScrollView. The first 3 aren't really compatible but SmartScrollView has been excluded as it doesn't seem to work the same on macOS. I might make add macOS support to SmartScrollView in the future but that would be another issue so I'll close this one.

Thanks very much. The Widget code looks very handy


Viewer login pop-up window not rendering correctly (secure feature service)

The login window does not render properly when viewing the submitted records of a secure feature layer.
http://esri.github.io/geoform-template-js/viewer.html?webmap=62686b3ffd1042e494479f6fcec9ba7c
Attached is a screenshot.

Thanks @sudhir449. Should be fixed online next week.

Matt - thanks for looking into this. It has fixed the styling on the login pop-up window, but now appears to cause some issue on how the page is displayed after logging in, especially the padding around the borders and the submit button is displayed only partially. Attached is a screenshot.

Thanks @sudhir449 . I think it should be good now.

Thanks Matt.


"java.lang.AssertionError: Unable to open url during 20sec!" in Zebrunner while running launches in from carina-demo


Framework to deliver one time notices/info

One first example is, Language incomplete, help us translate with a link to the Github help me issue. One close allow the user to set the "don't show me again".
We need to keep track of these notices. Show them under profile settings, allow the option to show notice again "show again".

please help with example where this popup apperas.

This framework doesn't exist. We need to create it. The idea is to be able to show the user one time notices. Some examples:

The 'Spanish' language isn't 100% translated, please be aware you may encounter English texts. Help us translate github.com/issue/abc
Add to your home screen

These are notices, not popup, it could be a 100% div floating on top bottom, etc. We can leverage this part on a current lib.js.

https://github.com/paulkr/overhang.js


Allow autoscale with a minimum of 0

check-pr failed during setup with:
1 validation error for AutoScale min ensure this value is greater than or equal to 1

Possibly due to #2112; needed a server-side change to match.

Re-running check-pr to validate.


Split client tests into unit tests and end-to-end tests

The client tests are very slow to run and have external dependencies on a
running dataserv server.
This change splits up the client tests into end-to-end tests and unit tests,
where unit tests have no dependencies on external processes or global state.
The end-to-end tests exercise client-server interaction, but do not test
scenarios that are client or server focused. For example, there is no end to
end tests for double-registration of the same address because this is covered
by unit tests in both dataserv-client and dataserv (server). The end to end
tests are mainly positive tests of successful interaction between client and
server.
Also does some minor cleanup of the test code (removes multiple inheritance,
switches to context handler version of assertRaises).

@mtlynch Please pull req into develop instead of master.


Case insensitivity is not being honored in certain DSR use cases

Bug Description
When a DSR is fulfilled, case insensitiveness is not being honored.
Steps to Reproduce

Spin up Fidesplus-POC
Make an order, use a lowercase email -<EMAIL_ADDRESS>Fulfill a DSR with a different case email -<EMAIL_ADDRESS>
Expected behavior
A description of what you expected to happen.
Screenshots

See repo Loom in slack

Environment
2.14.1 - plus
Additional context
Add any other context about the problem here.

@Roger-Ethyca  can we confirm if this is still a bug?


Parallelization example and improvements

This PR introduces a new example notebook for parallelization, using the new ipyparallel package name (#38). The new example also includes a new Jupyter Notebook--based progress bar and misc. bug fixes for perf_testing.py.

Coverage increased (+0.2%) to 20.997% when pulling a6467329f4d0d8913ca442c902b15b08324dadd9 on feature-betterparallel into eac042644ca9cfbf74a986db28653c4959a0dfc1 on master.

Coverage increased (+0.2%) to 20.997% when pulling 3d8790a01f268365edd21295dd4fae9a8d31f889 on feature-betterparallel into eac042644ca9cfbf74a986db28653c4959a0dfc1 on master.

Coverage increased (+0.1%) to 20.917% when pulling 6be5c47a1a18f795ef7453ccb8a809270db11c4a on feature-betterparallel into eac042644ca9cfbf74a986db28653c4959a0dfc1 on master.

Coverage increased (+0.1%) to 20.917% when pulling b1ace87a942f50a6fa09e538e576aa47da74e074 on feature-betterparallel into eac042644ca9cfbf74a986db28653c4959a0dfc1 on master.

This PR is pretty complete now, and successfully runs the example notebook on Python 2 and (with python3_support) Python 3, with both Windows and Linux. As such, I think it makes sense to merge it in now.


System crashes/hangs when running qemu-img convert

Currently unable to convert VMDK images to raw using qemu-img. Issue has been raised on GitLab: https://gitlab.com/qemu-project/qemu/-/issues/1216
If anyone knows of a workaround, please let me know/contribute.

Currently unable to convert VMDK images to raw using qemu-img. Issue has been raised on GitLab.
If anyone knows of a workaround, please let me know/contribute.

Now leveraging the following solution to hunt the VMDK directly - i.e. without converting
sudo modprobe nbd
sudo qemu-nbd -r -c /dev/nbd1 <DISK>.vmdk
sudo fdisk -l /dev/nbd1
sudo mount /dev/nbd1p3 /mnt/elrond_mount


RavenDB-20137 - adjustments

fixing the index if the first term was deleted
adding tests

Continuation of https://github.com/ravendb/lucenenet/pull/50


I'm not able to link to hassio

Can someone help me to link it ?
Thank you!
my log:
`
Logger: custom_components.remote_homeassistant
Source: custom_components/remote_homeassistant/init.py:176
First occurred: 16:54:39 (133 occurrences)
Last logged: 17:23:22
Could not connect to ws://<IP_ADDRESS>:8123/api/websocket, retry in 10 seconds.`
my cofing:
`
remote_homeassistant:
instances:

host: localhost
port: 8123
host: <IP_ADDRESS>
port: 8123
api_password: !secret hassio_zwave_api_key
entity_prefix: "hassio-zwave"
subscribe_events:

state_changed
service_registered
zwave.network_ready
zwave.node_event
`

i got it!!!

i changed api_password by access_token


Uncouple from pip a bit more

There are libraries we can use for better integration instead of relying so much on pip subprocesses. This could be part of a refactor where we isolate the components of the package a bit better.
Right now we have, roughly:

A CLI that mimics a subset of pip's UX with a couple extra flags
A PyPI solver backend based on: grayskull, pip; uv is planned too
A conda/pypi mapper based on several public resources (cf-graph-countyfair, grayskull, parselmouth)
A PyPI installer that essentially builds the command to be passed to pip. This could be reimplemented using PyPA's build and installer so conda can provide the build-system.requirements (which means we can offer compilers). This would also allow us to inject the right kind of metadata in the *.dist-info directories, in the right way.

cc @dholth
xref:

https://github.com/conda-incubator/conda-pypi/pull/36#issuecomment-2176816377
https://github.com/conda-incubator/conda-pypi/issues/35#issuecomment-2174255333
https://github.com/conda/conda-build/pull/5380

The PyPA build/installer integration seems backwards to me, as this package is about enabling conda users to successfully use Python packages from PyPI in their conda environments, not build new Python wheels that would be better served by conda packages in the first place.
Of course, it'd be splendid if the .conda file format would simply be a hypothetical .whl format plus metadata extensions. But then we're kind of back at square one with conda-press (talk).

This is only for the cases where we didn't find the corresponding conda artifact and the user insists on serving something from PyPI-compatible sources.
If there's only a sdist (or a sdist-compatible repository / directory), pip will build a wheel anyway. What happens behind that subprocess is underspecified and pip will create the build environment on its own with no conda involvement.
The intent here would be to have some control over that build environment; this is particularly important for those packages that require compilation so we provide the compilers and whatnot in an ABI compatible way.
Although at that point we could also just say "grayskull this and run conda-build on top", and that's also a valid option (albeit with its overheads). It would be one more option, I guess?
I don't see this as an immediate priority but I wanted to capture Daniel's thoughts before getting them lost in the sea of merged PRs and closed issues.


align T3DVec4, typedef it as T3DQuat and fix swapped vector/matrix comment

What is the use-case for aligning the vector?
In itself it doesn't need it and it may even waste a few bytes if part of a bigger struct. There should also be nothing that DMA's it with alignment restrictions like the RSP would for the fixed-point matrix.
As for the typedef, i do want to hold back on that for now.
I'm currently starting to add some function- and operator-overloads for better c++ compat where i would need distinct types.

Maybe you should switch to a kokkos/mdarray kokkos/mdspan inspired implementation for C++

Could you explain what what you mean?
I don't see the connection to the C++ part.
In any case, the other issues regarding alignment are still an issue.
So i would just want to know why you need the T3DVec4 aligned to 16 bytes?

The SGI Nintendo 64 RSP_Programmers_Guide states that there are 3 different alignment methods normal, packed requiring element size alignment and transpose requiring vector size alignment along with 8 byte alignment for RSP DMA.
Like other SIMD and vector type implementations the float4 should be a 16 byte aligned.
This restricts vector types not to be linear movable by one element at a time in memory.

This has nothing to do with T3DVec3, what you cite refers to the RSP, not CPU.
T3DVec3 only exists on the CPU (which has no SIMD) and is never used by the RSP


Log expiration

Since backrest maintains it's own log directory it should also expire logs automatically.
Default to 30 days and make it user configurable. [Per Russell's suggestion make the default = to retention-full?]

Moved to xml backlog.

This has been solved by moving logs to /var/log/pgbackrest.  Now standard log rotation processes should be used.