# Utilizing ZBL object Store

Ai-MicroCloud has a feature called Datasets. This feature uses respective object storage technology provided by the cloud providers in the backend. Users can upload their data and use it for development and production. Here is the link <https://computationaldocs.zeblok.com/info/data-and-metrics/datalake/datasets> of how to use the dataset feature using UI. Also, you can check the video at the end of the link on mounting the dataset with Ai-Workstation.

To mount the dataset with Ai-Microservices, follow the steps below:

* User needs to use the following "shell script" inside the microservice to access the datasets within Ai-MicroCloud. Please copy the script to the machine where you will create your docker image.

{% file src="<https://2123683600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR06Kg03vq0yT5VGHJJXe%2Fuploads%2Fng3YCtPiHbUKlk5ToB55%2Fzeblok_ds_mount.sh?alt=media&token=3b414b6a-791b-4625-8eb0-2f2d5bc09a43>" %}
Shell Script
{% endfile %}

* Create a Dockerfile\
  User needs to use the given environment variables, install required packages and include the above script inside your existing dockerfile.&#x20;

Below is the example of Dockerfile:

```
FROM ubuntu:22.04 

WORKDIR /app 

#Environment variables  

ENV BUCKET_TYPE="objectstorage" 

ENV S3_BUCKET_NAME="my-bucketname" 

ENV NB_USER="myusername" 

ENV datalake_url="https://datalake.url" 

ENV datalake_secret="myecrets" 

ENV platform_url="https://myurl" 

ENV ATTACH_BUCKET="yes" 

ENV DEFAULT_BUCKET="mydefaultbucket" 

ENV ACCOUNT_NAME="myaccountname" 

ENV ACCOUNT_KEY="key" 

ENV AWS_SECRET_KEY="myaccesskey" 

ENV AWS_ACCESS_KEY_ID="mysubcribeid" 

RUN mkdir bucket 

RUN mkdir static 

#Copy the zeblok_ds_mount.sh script  

COPY zeblok_ds_mount.sh /app 

#Install the required packages 

RUN apt update && apt-get install -y s3fs build-essential libfuse-dev libcurl4-openssl-dev libxml2-dev pkg-config libssl-dev mime-support automake libtool lsb-release fuse3 

RUN wget https://github.com/Azure/azure-storage-fuse/releases/download/blobfuse2-2.2.0/blobfuse2-2.2.0-Ubuntu-22.04.x86_64.deb && dpkg -i blobfuse2-2.2.0-Ubuntu-22.04.x86_64.deb && apt-get -f install -y && rm -rf blobfuse2-2.2.0-Ubuntu-22.04.x86_64.deb 

#Run the script on starting the container 

ENTRYPOINT ["sh", "/app/zeblok_ds_mount.sh"] 
```

{% hint style="warning" %}
All the env values will be picked up from backend. User doesn’t have to add env variables while spawning the microservice
{% endhint %}

* Check whether dataset is mounted\
  "*Once you onboard the microservice and spawn it, you should see the dataset on path /app/bucket*"

{% hint style="info" %}
Before the last step once the image is created please follow the [link](https://computationaldocs.zeblok.com/info/1.2.9/more/admin-guide/microservices) to onboard your newly created microservice onto the ZBL AI-Microcloud
{% endhint %}
