-
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.
- Loading branch information
Showing
6 changed files
with
449 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,39 @@ | ||
FROM continuumio/miniconda3:4.10.3 | ||
|
||
|
||
# Layers are approximately ordered from lowest turnover to highest | ||
# 1. Install Python & other base software | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y build-essential \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
|
||
# 2. Install Python dependencies | ||
|
||
WORKDIR /opt/sandle | ||
COPY requirements.txt /opt/sandle/ | ||
RUN pip install -r requirements.txt | ||
|
||
|
||
# 3. Add large model files | ||
|
||
|
||
# 4. Add application code | ||
|
||
COPY serve-openai-wrapper.py /opt/sandle/ | ||
|
||
|
||
# 5. Perform remaining configuration | ||
|
||
EXPOSE 8000 | ||
ENTRYPOINT ["python", "serve-openai-wrapper.py"] | ||
|
||
|
||
# Sentry configuration (needed by Python at runtime) | ||
|
||
ARG SENTRY_DSN | ||
ARG SENTRY_RELEASE | ||
|
||
ENV SENTRY_DSN=${SENTRY_DSN} | ||
ENV SENTRY_RELEASE=${SENTRY_RELEASE} |
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,4 @@ | ||
flake8 | ||
mypy | ||
types-requests | ||
types-waitress |
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,7 @@ | ||
[mypy] | ||
files = *.py | ||
exclude = /__pycache__/ | ||
# We already ignore third-party missing imports inline, | ||
# but the "exclude" option seems to have been added to mypy recently, | ||
# so we ignore missing imports globally as a fallback. | ||
ignore_missing_imports = True |
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,8 @@ | ||
click | ||
flask | ||
flask-cors | ||
flask-httpauth | ||
pydantic | ||
requests | ||
sentry-sdk[flask] | ||
waitress |
Oops, something went wrong.