-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from hc-sc-ocdo-bdpd/docker
Docker
- Loading branch information
Showing
4 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "Your Dev Container", | ||
"image": "docker.io/benjaminluohc/file_processing_tools:latest" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
.idea/ | ||
__pycache__ | ||
.github/ | ||
directory_test_files/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM python:3.10.12-slim | ||
|
||
WORKDIR /workspace | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
ffmpeg \ | ||
tesseract-ocr \ | ||
git | ||
|
||
RUN pip install git+https://github.com/hc-sc-ocdo-bdpd/file-processing-tools.git | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,37 @@ | ||
# file_processing_tools_template | ||
A demo project of the file_processing_tools library: https://github.com/hc-sc-ocdo-bdpd/file-processing-tools | ||
|
||
Setup this project using a virtual environment and import the contents of requirements.txt. | ||
<br> | ||
|
||
## Installation | ||
|
||
To begin installation, clone this repository and then follow one of the below options. | ||
|
||
<br> | ||
|
||
### Option 1: `venv` | ||
|
||
> Pre-requisite(s): `Python (v3)`, `ffmpeg`, `Tesseract`. See [here](https://hc-sc-ocdo-bdpd.github.io/file-processing-tools/1_tutorial/1_installation.html#additional-dependencies) for installation. These are not hard requirements; they are used for transcription (audio-to-text) and OCR (image-to-text) | ||
Create the virtual environment in VSCode: `View` (top left of the screen) > `Command Palette` > `Python: Create Environment` > `Venv` > `your-python-version` > `requirements.txt` | ||
|
||
<br> | ||
|
||
### Option 2: `Dockerfile` | ||
|
||
> Pre-requisite(s): Docker | ||
1. Install the VSCode extension: `Remote Development` (by Microsoft) | ||
2. In the top navigation menu: `View` > `Command Palette` > `Dev Containers: Rebuild and Reopen in Container` | ||
|
||
If step 2 does not work, then try after replacing the code in `.devcontainer/devcontainer.json` with the following: | ||
|
||
```json | ||
{ | ||
"name": "My Container", | ||
"build": { | ||
"context": "..", | ||
"dockerfile": "../Dockerfile" | ||
} | ||
} | ||
``` |