Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: Add Architecture-Specific Logic for msodbcsql in Dockerfile #4036

Open
1 task done
midilandlu opened this issue Dec 14, 2024 · 0 comments
Open
1 task done

Comments

@midilandlu
Copy link

midilandlu commented Dec 14, 2024

Is there an existing issue for the same feature request?

  • I have checked the existing issues.

Is your feature request related to a problem?

https://github.com/infiniflow/ragflow/issues/4013

Describe the feature you'd like

I would like to provide a suggestion regarding the previously reported issue: Build Issue: Nightly-slim Docker Image Creation Fails on macOS (arm64) #4013.
Specifically, for the new feature Add mssql support in the Dockerfile, I suggest including support for msodbcsql18 for ARM64.

Describe implementation you've considered

Based on current testing results (on macOS ARM64 environment), msodbcsql18 needs to be installed.
I hope future Dockerfiles can incorporate a conditional check for this. Specifically:

When $ARCH=arm64 (macOS ARM64 environment), install msodbcsql18.
In other cases (general x86_64 environment), install msodbcsql17.
Thank you!

Documentation, adoption, use case

No response

Additional information

suggestion code

# Add msssql ODBC driver
RUN --mount=type=cache,id=ragflow_apt,target=/var/cache/apt,sharing=locked \
    curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \
    curl https://packages.microsoft.com/config/ubuntu/22.04/prod.list > /etc/apt/sources.list.d/mssql-release.list && \
    apt update && \
    if [ -n "$ARCH" ] && [ "$ARCH" = "arm64" ]; then \
        # MacOS ARM64 
        ACCEPT_EULA=Y apt install -y unixodbc-dev msodbcsql18; \
    else \
        # (x86_64)
        ACCEPT_EULA=Y apt install -y unixodbc-dev msodbcsql17; \
    fi || \
    { echo "Failed to install ODBC driver"; exit 1; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant