🏆 Enhancements - this PR aims to dockerize the application
Purpose
It introduces containers and ease of building and adding features without worrying for configuration
Why?
As per changes required for the demo
Changes Introduced
[x] Removes the requirements.txt from root, splits dependencies amongst the backend and the frontend, by creating individual requirements.txt
[X] Moves the data/ from the root into backend/
[X] Moves all *.py files in backend to backend/src/
[X] Introduced image tag names for the images to be pushed to Docker Hub. This is the repository for the frontend, and the backend
Bugs (WIP)
[x] Frontend cannot make connection with the backend, Errno 111 - Connection Refused
[x] Jina requires aiohttp - to be added in requirements.txt
[x] Testing to make sure the frontend and the backend work without any problems
Notes
The backend container is gigantic, it's near 1 GB due to the torch dependency (831MB). I was able to cache the containers, which means you will only need to install the requirements once for both the containers, and it should practically load them given that the dependencies have not changed
To start the containers, you need to have docker, docker-compose on a machine. The containers can be built and started with running make docker in the root. They can be temporarily closed with Ctrl^C, started again with make up, and removed with make remove
A user called jina in the Dockerfile was created because pip does not like installing as root
Jina by itself download a file called pdb_data_seq.csv which is 10K lines long (hence so much green in this PR), I'm not sure why it did that
Pull Request Type
Purpose
Why?
Changes Introduced
requirements.txt
from root, splits dependencies amongst thebackend
and thefrontend
, by creating individualrequirements.txt
data/
from the root intobackend/
*.py
files inbackend
tobackend/src/
Docker Hub
. This is the repository for the frontend, and the backendBugs (WIP)
Errno 111 - Connection Refused
aiohttp
- to be added inrequirements.txt
Notes
backend
container is gigantic, it's near 1 GB due to thetorch
dependency (831MB). I was able to cache the containers, which means you will only need to install the requirements once for both the containers, and it should practically load them given that the dependencies have not changeddocker
,docker-compose
on a machine. The containers can be built and started with runningmake docker
in the root. They can be temporarily closed withCtrl^C
, started again withmake up
, and removed withmake remove
jina
in the Dockerfile was created becausepip
does not like installing as rootpdb_data_seq.csv
which is 10K lines long (hence so much green in this PR), I'm not sure why it did thatFeedback required over
Mentions