- Docker
- Docker Compose
- GitHub CLI (optional)
- Internet connection
Open under the hood configuration
The container is built using the continuumio/miniconda3 image as a base, providing support for Conda. Here's a detailed list of what's inside the container:
- Python 3.11
- pip
- wheel
- ipykernel
- ipython
- ipython_genutils
- jupyter
- jupyter_client
- jupyter_console
- jupyter_core
- jupyterlab
- jupyterlab_server
- requests
- nest-asyncio
- beautifulsoup4
- matplotlib
- nltk
- numpy
- pandas
- plotly
- psycopg2-binary
- regex
- scikit-learn
- scipy
- seaborn
- sqlalchemy
- statsmodels
- catboost
- pyspark
- torch
- transformers
- pillow
- keras
- tensorflow
- traitlets (version 5.9.0)
- notebook (version 6.4.0)
- jupyter_contrib_nbextensions
- jupyter_nbextensions_configurator
- toc2/main
- A dedicated directory
/opt/condais created for the Conda environment. - The working directory is set to
/workspace. - Port 8888 is exposed for Jupyter Notebook.
- Jupyter Notebook is configured to start with the command to run on IP
0.0.0.0, without opening a browser, and allowing root access.
The project includes a PostgreSQL database container configured as follows:
- Image:
postgres:latest- This uses the latest version of the official PostgreSQL image. - Container Name:
practicum_postgres- The name of the container running PostgreSQL. - Environment Variables:
POSTGRES_USER=practicum- The default user for PostgreSQL.POSTGRES_PASSWORD=toor- The password for thepracticumuser.POSTGRES_DB=practicum- The default database created when the container starts.
- Ports:
5432:5432- The PostgreSQL default port5432is exposed and mapped to the host.
- Volumes:
postgres-data:/var/lib/postgresql/data- This volume is used to persist the database data even after the container is stopped or deleted.
This configuration ensures that the PostgreSQL database is ready to be used by the application with the specified settings.
# GitHub CLI
gh repo clone Resmedia/python-yandex-practicum python
#or HTTPS
git clone https://github.com/Resmedia/python-yandex-practicum.git python
#P.S. "python" is the name of the folder where the repository will be cloned you can change it!!!Attention. The current Dockerfile for INTEL Processor use only. For users who have M Silicon processor do next:
- Delete
Dockerfile - Rename
DockerfileSilicontoDockerfile
!!! Before building the project connect to good internet connection, because the image is about 4.5 GB
docker build -t practicum .
# or
docker-compose up --build # to rebuild the image with logs
docker-compose up -d --build # to rebuild the image without logsdocker-compose up # with logs
docker-compose up -d # without logs
docker-compose down # to stop the containerhttp://localhost:8888docker-compose logsdocker-compose logs <service>docker build -t friendlyname . docker run -p 4000:80 friendlynamedocker run -d -p 4000:80 friendlynamedocker psdocker stop <hash>docker ps -adocker kill <hash>docker rm <hash>docker rm $(docker ps -a -q)docker images -adocker rmi <imagename>docker rmi $(docker images -q)docker logindocker tag <image> username/repository:tagdocker push username/repository:tagdocker run username/repository:tag