Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
MagnusS0 committed Sep 23, 2023
2 parents 265ee46 + 1b3c949 commit e4c7a7c
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 28 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Docker Image CI

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Build the Docker image
env:
API_KEY: ${{ secrets.API_KEY }}
run: docker build . --file Dockerfile --build-arg API_KEY=$API_KEY --tag movie_rec_system:$(date +%s)
69 changes: 41 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,47 @@ The project involves the following components:
- Docker
> See the `pyproject.toml` file for the full list of dependencies.
## How to Run it
<details>
<summary>Click me</summary>

1. Clone the repository
```sh
git clone https://github.com/MagnusS0/movie-rec-system.git
```
2. Navigate to the directory where you downloaded the repository
``` sh
cd movie_rec_system
```

### Run - with Docker

```sh
docker build -t movie_rec_system:latest -f Dockerfile .
docker run -p 8000:8000 movie_rec_system:latest
```

### Run - locally

1. Make sure you have `Poetry` innstalled in your enviornment
```sh
pip install poetry
```
2. Install dependencies
```sh
poetry lock
poetry install
```
3. Build the pipline with `Ploomber` build
```sh
poetry run ploomber build
```
4. Run the app (make sure you are in the right dir)
```sh
uvicorn app.app:app
```
</details>

## Data
The data is extracted from TheMovieDB API and stored in a DuckDB database movies_data.duckdb. It contains information on movies like title, overview, genres, ratings, etc.

Expand Down Expand Up @@ -75,31 +116,3 @@ Sample Output:
}
}
```

## Usage
To run the project locally:

1. Clone the repository
```
git clone https://github.com/MagnusS0/movie-rec-system.git
```
2. Navigate to the directory where you downloaded the repository
``` bash
cd movie_rec_system
```
3. Make sure you have `Poetry` innstalled in your enviornment
```
pip install poetry
```
4. Install dependencies
```
poetry install
```
5. Build the pipline with `Ploomber` build
```
ploomber build
```
6. Run the app (make sure you are in the right dir)
```
uvicorn app.app:app
```

0 comments on commit e4c7a7c

Please sign in to comment.