You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+65-1Lines changed: 65 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,7 @@ The [sample report](https://unicef.github.io/adt-press/) can help in better unde
23
23
24
24
- Python 3.13 or higher
25
25
- UV package manager (recommended)
26
+
-**You must set the environment variable `OPENAI_API_KEY` with your OpenAI API key for the application to work.**
26
27
27
28
## Installation
28
29
@@ -111,4 +112,67 @@ uv run pytest
111
112
-`config/`: Configuration files
112
113
-`prompts/`: LLM prompt templates
113
114
-`templates/`: HTML templates
114
-
-`tests/`: Test files
115
+
-`tests/`: Test files
116
+
117
+
## Docker
118
+
119
+
Build the image:
120
+
121
+
```bash
122
+
docker build -t adt-press .
123
+
```
124
+
125
+
Run the container:
126
+
127
+
```bash
128
+
docker run --rm adt-press
129
+
```
130
+
131
+
To run a specific command inside the container (for example, to execute `uv run adt-press.py` with a PDF file):
132
+
133
+
```bash
134
+
docker run --rm adt-press uv run adt-press.py pdf_path=/data/yourfile.pdf
135
+
```
136
+
137
+
Replace `/data/yourfile.pdf` with the path to your PDF file inside the container.
138
+
139
+
---
140
+
141
+
#### VS Code: "Reopen in Container"
142
+
143
+
If you use Visual Studio Code, you can take advantage of the **"Reopen in Container"** feature for a full-featured development environment inside Docker.
144
+
This allows you to edit, run, and debug your code directly within the container.
145
+
146
+
To use this, add a `.devcontainer` configuration to your project and select "Reopen in Container" from the VS Code command palette.
147
+
You will need to have the **Dev Containers** extension installed in VS Code to use this feature.
148
+
149
+
---
150
+
151
+
**Note:**
152
+
The folder `.devcontainer` needs to be in the root of your project, containing a `devcontainer.json` file with the following content:
153
+
154
+
```json
155
+
{
156
+
"name": "ADT Press",
157
+
"build": {
158
+
// Sets the run context to one level up instead of the .devcontainer folder.
159
+
"context": "..",
160
+
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
161
+
"dockerfile": "../Dockerfile"
162
+
}
163
+
}
164
+
```
165
+
166
+
---
167
+
168
+
**Environment Variable Required**
169
+
170
+
> **Note:**
171
+
> You must set the environment variable `OPENAI_API_KEY` with your OpenAI API key for the application to work.
172
+
>
173
+
> - When running the Dockerized version, you need to set the `OPENAI_API_KEY` variable every time you run the container.
174
+
> For example:
175
+
> ```bash
176
+
> docker run --rm -e OPENAI_API_KEY=your-key-here adt-press
177
+
>```
178
+
> - When using VS Code "Reopen in Container", you can add the variable to your `.env` file or set it in the container terminal before running your scripts.
0 commit comments