Skip to content

Instantly share code, notes, and snippets.

View cosmic-cortex's full-sized avatar
😎

Tivadar Danka cosmic-cortex

😎
View GitHub Profile
@cosmic-cortex
cosmic-cortex / Dockerfile
Created January 28, 2020 14:15
Dockerfile for our FastAPI application
FROM ubuntu:19.10
COPY ./api /api/api
COPY requirements.txt /requirements.txt
RUN apt-get update \
&& apt-get install python3-dev python3-pip -y \
&& pip3 install -r requirements.txt
ENV PYTHONPATH=/api
@cosmic-cortex
cosmic-cortex / docker-compose.yaml
Last active January 29, 2020 09:38
docker-compose file for the FastAPI app
version: "3"
services:
fastapi-ml-quickstart:
build: .
ports:
- 8000:8000
@cosmic-cortex
cosmic-cortex / ci.yaml
Created January 29, 2020 11:25
Automated testing using GitHub actions
# This GitHub action describes the continuous integration workflow for pull requests to master.
name: ci
on:
pull_request:
branches:
- master
push:
branches:
@cosmic-cortex
cosmic-cortex / docker-compose.test.yaml
Created January 29, 2020 11:39
Docker compose config for unit testing
version: "3"
services:
fastapi-ml-quickstart:
build: .
ports:
- 8000:8000
entrypoint: ["pytest"]
@cosmic-cortex
cosmic-cortex / predict_skeleton.py
Last active January 29, 2020 12:37
Skeleton of the predict endpoint
@app.post("/predict", response_model=PredictResponse)
def predict(input: PredictRequest):
return PredictResponse(data=[0.0])