diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..f4d5db4 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +profiles/ +results/ +__pycache__/ +.venv/ +tests/ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ad7bffd --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +FROM simulationcraftorg/simc:latest + +RUN apk add --no-cache python3 py3-pip git + +ENV VIRTUAL_ENV=/opt/venv +RUN python3 -m venv $VIRTUAL_ENV +ENV PATH="$VIRTUAL_ENV/bin:$PATH" + +# Install dependencies: +COPY requirements.txt . +RUN pip install -r requirements.txt + +COPY . . + +EXPOSE 8000 + +ENTRYPOINT [] + +CMD ["fastapi", "run", "main.py", "--port", "8000"] diff --git a/main.py b/main.py index e06da60..a3e9431 100644 --- a/main.py +++ b/main.py @@ -12,7 +12,8 @@ from simcrunner.simc import HtmlExport # SIMC Settings logging.basicConfig(level=logging.INFO) -simc_path = os.path.join('tests', 'simc') +# simc_path = os.path.join('tests', 'simc') +simc_path = "./" runner = Simc(simc_path=simc_path) app = FastAPI()