mssql-docker
mssql-docker copied to clipboard
Machine Learning Extension SQL Server 2022 not working
I am trying to get the ML extension working in SQL Server 2022 docker but can't find anything online specifically for 2022. Thre is a guide to get it working for 2019 (https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-setup-machine-learning-docker?view=sql-server-ver15). I have tried to change the dockerfile to use 2022 but with no success. Does anyone know how I can get this to work?
The closes I got to was this but there were multiple Launchpad errors which caused my python query to just hang.
# Maintainers: Microsoft Corporation
FROM ubuntu:22.04
# copy in supervisord conf file
COPY ./supervisord.conf /usr/local/etc/supervisord.conf
# Set environment variables for SQL Server
ENV ACCEPT_EULA=Y \
MSSQL_COLLATION=Latin1_General_CI_AS \
ACCEPT_EULA_ML=Y
# install supporting packages
RUN apt-get update && \
apt-get install -y apt-transport-https \
curl \
supervisor \
fakechroot \
locales \
iptables \
sudo \
wget \
curl \
zip \
unzip \
make \
bzip2 \
m4 \
apt-transport-https \
tzdata \
libnuma-dev \
libsss-nss-idmap-dev \
software-properties-common
# Adding custom MS repository
RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
RUN curl https://packages.microsoft.com/config/ubuntu/22.04/mssql-server-2022.list > /etc/apt/sources.list.d/mssql-server-2022.list
# install SQL Server ML services R and Python packages which will also install the mssql-server pacakge, the package for SQL Server itself
# if you want to install only Python or only R, you can add/remove the package as needed below
RUN apt-get update && \
apt-get install -y mssql-server-extensibility libssl-dev && \
# Cleanup the Dockerfile
apt-get clean && \
rm -rf /var/apt/cache/* /tmp/* /var/tmp/* /var/lib/apt/lists
# run checkinstallextensibility.sh
RUN /opt/mssql/bin/checkinstallextensibility.sh && \
# set/fix directory permissions and create default directories
chown -R root:root /opt/mssql/bin/launchpadd && \
chown -R root:root /opt/mssql/bin/setnetbr && \
mkdir -p /var/opt/mssql-extensibility/data && \
mkdir -p /var/opt/mssql-extensibility/log && \
chown -R root:root /var/opt/mssql-extensibility && \
chmod -R 777 /var/opt/mssql-extensibility && \
# locale-gen
locale-gen en_US.UTF-8
# # expose SQL Server port
# EXPOSE 1433
# start services with supervisord
CMD /usr/bin/supervisord -n -c /usr/local/etc/supervisord.conf
Hi @semics-tech
You might find more useful help using the support button on the bottom left of this page https://mcr.microsoft.com/en-us/product/mssql/server/about.
This repository is for something unrelated and does not appear to be supported anymore. I am not a contributor to this repository but after a quick look, no one has touched much here in the past year.