Skip to content

ravi-prakash1907/Artificial-Intelligence

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A repository for Artificial Intelligance (AI)

banner
A series of programs implemented in prolog

Practical List

Click here to see the practical list


To run Prolog commend line:

(A) Without 'docker-compose.yml'

While using very first time:

  1. Navigate to the Prolog-Programming directory.
  2. Run the following command -
docker build . -t prolog  

This command builds an image using the Dockerfile i.e. already present in this directory.
Here -t tags the image i.e. gives an alternative name to the image that is being build. It helps it identify the image easily rather than using its id.

Use the following command to run the prolog on command line:

Once the image is created, we are good to go ahead to run it, whenever needed.

docker run -it --rm prolog

Here **-it** stands for *interactive terminal*
**--rm** Automatically remove the container when it exits i.e. stops

As: Use comend line to run desired commands.
Put all the prolog files (.pl) file in src directory.


(B) Using 'docker-compose.yml'

While using very first time:

  1. Navigate to the Prolog-Programming directory.
  2. Run the following command -
docker-compose build --no-rm prolog  

This command builds an image using the Dockerfile i.e. already present in this directory.
Here --no-rm used not to remove the intermediate containers that are also build during creating this image named prolog-programming_prolog

Use the following command to run the prolog on command line:

Once the image is created, we are good to go ahead to run it, whenever needed.

docker run -it --rm prolog-programming_prolog

Here
-it stands for interactive terminal
--rm Automatically remove the container when it exits i.e. stops


visit here for a quick walkthrough with prolog