<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to configure Databricks token inside Docker File? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-to-configure-databricks-token-inside-docker-file/m-p/20540#M13869</link>
    <description>&lt;P&gt;The Databricks cli credential can be configured by editing file ~/.databrickscfg .&lt;/P&gt;&lt;P&gt;The file content will be like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;[DEFAULT]
host = [workspace url]
username = [email id]
password = [password]
 
[profile 1]
host = [workspace url]
token = {personal access token}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;After the Databricks Cli installed succeed, you can append your credential and workspace url to the file ~/.databrickscfg. Then the cli is ready to use. &lt;/P&gt;</description>
    <pubDate>Thu, 24 Jun 2021 18:08:28 GMT</pubDate>
    <dc:creator>User16752239289</dc:creator>
    <dc:date>2021-06-24T18:08:28Z</dc:date>
    <item>
      <title>How to configure Databricks token inside Docker File?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-configure-databricks-token-inside-docker-file/m-p/20539#M13868</link>
      <description>&lt;P&gt;I have a docker file where I want to&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Download the Databricks CLI&lt;/LI&gt;&lt;LI&gt;Configure the CLI by adding a host and token&lt;/LI&gt;&lt;LI&gt;And then running a python file that hits the Databricks token&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I am able to install the CLI in the docker image, and I have a working python file that is able to submit the job to the Databricks API but Im unsure of how to configure my CLI within docker.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jun 2021 15:48:43 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-configure-databricks-token-inside-docker-file/m-p/20539#M13868</guid>
      <dc:creator>User16790091296</dc:creator>
      <dc:date>2021-06-24T15:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure Databricks token inside Docker File?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-configure-databricks-token-inside-docker-file/m-p/20540#M13869</link>
      <description>&lt;P&gt;The Databricks cli credential can be configured by editing file ~/.databrickscfg .&lt;/P&gt;&lt;P&gt;The file content will be like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;[DEFAULT]
host = [workspace url]
username = [email id]
password = [password]
 
[profile 1]
host = [workspace url]
token = {personal access token}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;After the Databricks Cli installed succeed, you can append your credential and workspace url to the file ~/.databrickscfg. Then the cli is ready to use. &lt;/P&gt;</description>
      <pubDate>Thu, 24 Jun 2021 18:08:28 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-configure-databricks-token-inside-docker-file/m-p/20540#M13869</guid>
      <dc:creator>User16752239289</dc:creator>
      <dc:date>2021-06-24T18:08:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure Databricks token inside Docker File?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-configure-databricks-token-inside-docker-file/m-p/20541#M13870</link>
      <description>&lt;P&gt;Hi I was facing same issue and searching for the solution but didnt get it, and now after working on it i have the solution &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you want to access databricks models/download_artifacts using hostname and access token like how you do on databricks cli&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;databricks configure --token --profile &amp;lt;profile name&amp;gt;
&amp;nbsp;
&amp;gt;Databricks Host (should begin with &lt;A href="https://):" target="test_blank"&gt;https://):&lt;/A&gt; &amp;lt;hostname&amp;gt;
&amp;gt;Token : &amp;lt;token&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you have created profile name and pushed models and just want to access the model/artifacts in docker using this profile&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;Add below code in the docker file&lt;/B&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;RUN pip install databricks_cli
&amp;nbsp;
ARG HOST_URL
&amp;nbsp;
ARG TOKEN
&amp;nbsp;
RUN echo "[&amp;lt;profile name&amp;gt;]\nhost = ${HOST_URL}\ntoken = ${TOKEN}" &amp;gt;&amp;gt; ~/.databrickscfg&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#this will created your .databrickscfg file with host and token after build the same way you do using databricks configure command&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;Add args HOST_URL and TOKEN in the docker build&lt;/B&gt;&lt;/P&gt;&lt;P&gt;e.g &lt;/P&gt;&lt;P&gt;your host name = &lt;A href="https://adb-5443106279769864.19.azuredatabricks.net/" target="test_blank"&gt;https://adb-5443106279769864.19.azuredatabricks.net/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;your access token = dapi********************63c1-2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;sudo docker build -t test_tag --build-arg HOST_URL=&amp;lt;your host name&amp;gt; --build-arg TOKEN=&amp;lt;your access token&amp;gt; .&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;And now you can access your experiments using this profilename Databricks:&amp;lt;profile name&amp;gt; in the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2022 16:16:42 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-configure-databricks-token-inside-docker-file/m-p/20541#M13870</guid>
      <dc:creator>sachingawade</dc:creator>
      <dc:date>2022-11-02T16:16:42Z</dc:date>
    </item>
  </channel>
</rss>

