Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. With Docker, you can manage your infrastructure in the same ways you manage your applications. By taking advantage of Docker’s methodologies for shipping, testing, and deploying code quickly, you can significantly reduce the delay between writing code and running it in production.
More on : Read Documentation Here
FROM python:3.9
WORKDIR /classifier
COPY requirements.text ./requirements.txt
RUN pip install -r requirements.txt
EXPOSE 8501
COPY . /classifier
ENTRYPOINT ["streamlit", "run"]
CMD ["classifier.py"]
docker build -t <image-name> .<current directory>
docker build -t classifier:latest .
docker run --publish <port number> <image-name>
docker run --publish 8501:8501 classifier:latest