Skip to content

Commit

Permalink
adds Docker file; removes unecessary data; optimize requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielBarberini committed Dec 16, 2023
1 parent 703566b commit 330004c
Show file tree
Hide file tree
Showing 49 changed files with 22 additions and 5,873 deletions.
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM python:3.11-slim-bookworm

EXPOSE 3000

USER api

WORKDIR /code

COPY ./requirements.txt /code/requirements.txt

RUN apt-get update && \
apt-get install -y --no-install-recommends git && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
pip3 install --no-cache-dir --upgrade -r /code/requirements.txt && \
apt-get purge -y --auto-remove && \
rm -rf /var/lib/apt/lists/*

COPY ./lib /code/lib

CMD ["gunicorn", "-k", "uvicorn.workers.UvicornWorker", "lib:app", "-b", "0.0.0.0:3000"]
2 changes: 1 addition & 1 deletion lib/controllers/motor.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class MotorController():
def __init__(self, motor: Motor, motor_kind):
self.guard(motor, motor_kind)
motor_core = {
"thrust_source": f"lib/data/motors/{motor.thrust_source.value}.eng",
"thrust_source": f"lib/data/engines/{motor.thrust_source.value}.eng",
"burn_time": motor.burn_time,
"nozzle_radius": motor.nozzle_radius,
"dry_mass": motor.dry_mass,
Expand Down
199 changes: 0 additions & 199 deletions lib/data/caldene/drag.csv

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 330004c

Please sign in to comment.