0% found this document useful (0 votes)
33 views7 pages

Assignment03

The document describes containerizing and deploying a deep reinforcement learning application using Docker. It provides steps to train an agent to navigate a maze using reinforcement learning, containerize the application, and deploy it on DockerHub.

Uploaded by

Amit Shaw
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views7 pages

Assignment03

The document describes containerizing and deploying a deep reinforcement learning application using Docker. It provides steps to train an agent to navigate a maze using reinforcement learning, containerize the application, and deploy it on DockerHub.

Uploaded by

Amit Shaw
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

CS/IT324 Lab

Sanidhya Kumar | 202151138

Containerize and deploy Deep Reinforcement Learning Applica on using Docker

Objec ve: The objec ve of this lab is to containerize and deploy your Deep Reinforcement
Learning applica on. Design a Deep Reinforcement Learning applica on where you are given
a maze and you must navigate the maze using a reinforcement learning agent. A er you
have trained the model, deploy the model on dockerhub.

EXERCISE: Running the code on our local machine first:

1. Installing gymnasium library first:

2. Impor ng necessary libraries:

3. Framing the agent class and defining all its func ons:
4. Making an object of Agent class:
5. Se ng the value of train_episodes and test_episodes for ideal execu on of the
program. Here, I have set the value of train_episodes to 69 and test_episodes to 39
to quickly complete the execu on. It is important to note that these values can be
adjusted as per the needs of the program. These values which have been set here are
not the op mal values:

6. Training the agent:

7. Obtaining the train mean % score a er training the agent – Note that the metrics
values are low due to less number of episodes!

8. Tes ng our trained agent on test environment:


9. Obtaining the test mean % score a er training the agent - Note that the metrics
values are low due to less number of episodes!

10. Training Score v/s Episode plot:

11. Epsilon v/s Episode plot:


12. Test Score v/s Episode plot:

EXERCISE: Containerizing the applica on

0. Making folder for our project:

1. Create a file named app.py. Write the code for reinforcement learning – Only last few
lines are displayed due to excessive length:

2. Create a Dockerfile:

3. Men on the requirements and the dependencies on the requirements.txt file:


4. Dockerize your applica on and upload the project on dockerhub and a ach the
screenshot:

a) Run docker build command to build the docker image:

b) Login into your docker account:

c) Push to dockerhub:

d) Project uploaded on dockerhub (my account’s screenshot is a ached below):


*****

You might also like