Skip to content

Commit

Permalink
Add changes from dry run server.
Browse files Browse the repository at this point in the history
  • Loading branch information
ccmaymay committed Oct 21, 2023
1 parent f5b28d0 commit f678c34
Show file tree
Hide file tree
Showing 6 changed files with 449 additions and 1 deletion.
39 changes: 39 additions & 0 deletions auth-wrapper/Dockerfile
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}
4 changes: 4 additions & 0 deletions auth-wrapper/dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
flake8
mypy
types-requests
types-waitress
7 changes: 7 additions & 0 deletions auth-wrapper/mypy.ini
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
8 changes: 8 additions & 0 deletions auth-wrapper/requirements.txt
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
Loading

0 comments on commit f678c34

Please sign in to comment.