-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Slight changes for dockerised version
- Loading branch information
1 parent
3d720e7
commit 1b1adb0
Showing
4 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM python:3-alpine AS builder | ||
|
||
WORKDIR /app | ||
|
||
RUN python3 -m venv venv | ||
ENV VIRTUAL_ENV=/app/venv | ||
ENV PATH="$VIRTUAL_ENV/bin:$PATH" | ||
|
||
COPY requirements.txt . | ||
RUN pip install -r requirements.txt | ||
|
||
# Stage 2 | ||
FROM python:3-alpine AS runner | ||
|
||
WORKDIR /app | ||
|
||
COPY --from=builder /app/venv venv | ||
COPY minvime minvime | ||
COPY minvime-runner.py app.py | ||
|
||
ENV VIRTUAL_ENV=/app/venv | ||
ENV PATH="$VIRTUAL_ENV/bin:$PATH" | ||
ENV FLASK_APP=app/app.py | ||
|
||
EXPOSE 8080 | ||
|
||
CMD ["gunicorn", "--bind" , ":8080", "--workers", "2", "app:app"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
gunicorn | ||
setuptools | ||
Flask>=2.2.2 | ||
numpy>=1.16.4 | ||
pandas>=0.25.3 | ||
|