feat: add Docker support
This commit is contained in:
parent
f2cc7e59ac
commit
541a3c1ae7
5
.dockerignore
Normal file
5
.dockerignore
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
profiles/
|
||||||
|
results/
|
||||||
|
__pycache__/
|
||||||
|
.venv/
|
||||||
|
tests/
|
19
Dockerfile
Normal file
19
Dockerfile
Normal file
@ -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"]
|
3
main.py
3
main.py
@ -12,7 +12,8 @@ from simcrunner.simc import HtmlExport
|
|||||||
|
|
||||||
# SIMC Settings
|
# SIMC Settings
|
||||||
logging.basicConfig(level=logging.INFO)
|
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)
|
runner = Simc(simc_path=simc_path)
|
||||||
|
|
||||||
app = FastAPI()
|
app = FastAPI()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user