Skip to content

Commit

Permalink
Merge pull request #2 from hc-sc-ocdo-bdpd/docker
Browse files Browse the repository at this point in the history
Docker
  • Loading branch information
benjaminLuoHC authored Feb 29, 2024
2 parents 34a8a7b + d7bff5f commit 5ca9393
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .devcontainer/devcontainer.json
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"
}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
.idea/
__pycache__
.github/
directory_test_files/
12 changes: 12 additions & 0 deletions Dockerfile
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


35 changes: 34 additions & 1 deletion README.md
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"
}
}
```

0 comments on commit 5ca9393

Please sign in to comment.