Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Dockerfile setup #1

Merged
merged 4 commits into from
Apr 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ RUN apt-get update && apt-get install -y ffmpeg

WORKDIR /app

COPY . .

COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt

CMD ["python", "/app/transcribe_me/main.py"]
COPY . .

ENTRYPOINT ["python", "-m", "transcribe_me.main"]

LABEL org.opencontainers.image.source=https://github.com/echohello-dev/transcribe-me
LABEL org.opencontainers.image.description="The transcriber that uses Anthropic and OpenAI."
Expand Down
32 changes: 25 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,27 @@ This has been tested with macOS, your mileage may vary on other operating system

You can also run the application using Docker:

1. Run the following command to run the application in Docker:
1. Install Docker on your machine by following the instructions on the [Docker website](https://docs.docker.com/get-docker/).

2. Create a `.transcribe.yaml` configuration file:

```bash
touch .transcribe.yaml
docker run \
--rm \
-v $(pwd)/.transcribe.yaml:/app/.transcribe.yaml \
ghcr.io/echohello-dev/transcribe-me:latest install
```


3. Run the following command to run the application in Docker:

```bash
docker run \
--rm \
-e OPENAI_API_KEY \
-e ANTHROPIC_API_KEY \
-v $(pwd)/archive:/app/archive \
-v $(pwd)/input:/app/input \
-v $(pwd)/output:/app/output \
-v $(pwd)/.transcribe.yaml:/app/.transcribe.yaml \
Expand All @@ -104,7 +120,7 @@ You can also run the application using Docker:

This command mounts the `input` and `output` directories and the `.transcribe.yaml` configuration file into the Docker container.

2. (Optional) We can also run the application using the provided `docker-compose.yml` file:
4. (Optional) We can also run the application using the provided `docker-compose.yml` file:

```yaml
version: '3'
Expand All @@ -121,13 +137,15 @@ You can also run the application using Docker:
- ./.transcribe.yaml:/app/.transcribe.yaml
```

Run the following command to start the application using Docker Compose:
Run the following command to start the application using Docker Compose:

```bash
docker compose run --rm app
```
```bash
docker compose run --rm transcribe-me
```

This command mounts the `input`, `output`, `archive`, and `.transcribe.yaml` configuration file into the Docker container. See [`compose.example.yaml`](./compose.example.yaml) for an example configuration.

This command mounts the `input`, `output`, `archive`, and `.transcribe.yaml` configuration file into the Docker container. See [`compose.example.yaml`](./compose.example.yaml) for an example configuration.
Make sure to replace `OPENAI_API_KEY` and `ANTHROPIC_API_KEY` with your actual API keys. Also make sure to create the `.transcribe.yaml` configuration file in the same directory as the `docker-compose.yml` file.

## :rocket: How it Works

Expand Down
1 change: 0 additions & 1 deletion transcribe_me/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@
parts = __version__.split(".")
if len(parts) != 3 or not all(part.isdigit() for part in parts):
__version__ = "0.0.0"

Loading