|
@@ -20,82 +20,82 @@
|
|
|
1. Creating a `virtual environment`.
|
|
|
1. Launch the terminal.
|
|
|
1. Go to the home directory by typing the following command.
|
|
|
- ``` bash
|
|
|
+ ```
|
|
|
cd ~
|
|
|
```
|
|
|
1. Make a new directory `Installs` using the following command:
|
|
|
- ``` bash
|
|
|
+ ```
|
|
|
mkdir Installs
|
|
|
```
|
|
|
1. Create a virtual environment `venv`
|
|
|
- ``` bash
|
|
|
+ ```
|
|
|
python3 -mvenv venv
|
|
|
```
|
|
|
1. Activate the virtual environment:
|
|
|
- ``` bash
|
|
|
+ ```
|
|
|
source ~/Installs/venv/bin/activate
|
|
|
```
|
|
|
1. Setting up `apache-tika`
|
|
|
1. Launch terminal
|
|
|
1. Enter the following command to go to the base directory:
|
|
|
- ``` bash
|
|
|
+ ```
|
|
|
cd ~
|
|
|
```
|
|
|
1. Download the apache-tika server using the following command:
|
|
|
- ``` bash
|
|
|
+ ```
|
|
|
wget https://www.apache.org/dyn/closer.lua/tika/1.28.4/tika-server-1.28.4.jar
|
|
|
```
|
|
|
1. Check if java is installed in your machine by running the following command:
|
|
|
- ``` bash
|
|
|
+ ```
|
|
|
java --version
|
|
|
```
|
|
|
1. If java is not installed in your local machine, please refer to [this documentation.](https://www.java.com/en/download/help/download_options.html)
|
|
|
|
|
|
1. Running the tika server
|
|
|
1. Create a new screen called `apache-tika`
|
|
|
- ``` bash
|
|
|
+ ```
|
|
|
screen -S apache-tika
|
|
|
```
|
|
|
1. Enter the following command to run the tika server:
|
|
|
- ``` bash
|
|
|
+ ```
|
|
|
java -jar {your tika server}
|
|
|
```
|
|
|
|
|
|
### Setting up the code base.
|
|
|
1. Launch the terminal.
|
|
|
1. Enter the following command to go to the base directory:
|
|
|
- ``` bash
|
|
|
+ ```
|
|
|
cd ~
|
|
|
```
|
|
|
1. Make a new directory `Code` by using the following command:
|
|
|
- ``` bash
|
|
|
+ ```
|
|
|
mkdir Code
|
|
|
```
|
|
|
1. Pull the current repository by entering the following command:
|
|
|
- ``` bash
|
|
|
+ ```
|
|
|
git pull gogs@git.fafadiatech.com:harsh/pdf_parser.git
|
|
|
```
|
|
|
|
|
|
### Running the docker file:
|
|
|
1. Launch the terminal.
|
|
|
2. Change the directory to the docker file by the following command.
|
|
|
- ```bash
|
|
|
+ ``
|
|
|
cd ~/Code/pdf_parser/docker/
|
|
|
```
|
|
|
3. Check if docker is installed in your machine using the command below. If it throws an error, refer to this [documentation](https://docs.docker.com/engine/install/)
|
|
|
- ```bash
|
|
|
+ ``
|
|
|
docker ps
|
|
|
```
|
|
|
4. Pull the required images using the following command.
|
|
|
- ```bash
|
|
|
+ ``
|
|
|
docker pull docker-compose.yml
|
|
|
```
|
|
|
5. Build the docker volume using the following command.
|
|
|
- ```bash
|
|
|
+ ``
|
|
|
docker-compose build
|
|
|
```
|
|
|
6. Activate a new screen and activate the containers using the following commands.
|
|
|
- ```bash
|
|
|
+ ``
|
|
|
screen -S docker
|
|
|
docker-compose up
|
|
|
```
|