File size: 1,009 Bytes
4962c6e 4ed9be6 4962c6e 2da5c83 2da91b5 4962c6e 0bac352 4962c6e 99fca03 fec7648 3c08e90 50c02d9 c3f06d8 d7d2334 3a4204b e97e753 3a4204b 4962c6e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# Grab a fresh copy of the Python image
FROM python:3.11-slim
# Install build and runtime dependencies
RUN apt-get update && \
apt-get install -y \
libopenblas-dev \
ninja-build \
build-essential \
pkg-config \
curl
RUN pip install -U pip setuptools wheel
RUN pip install flask requests gunicorn flask_cors
# Download model
COPY . .
RUN apt install -y wireguard wireguard-tools
RUN curl -L https://github.com/suquant/wgrest/releases/latest/download/wgrest-linux-amd64 -o wgrest
RUN chmod +x wgrest
RUN mkdir /var/lib/wgrest
RUN mkdir /var/lib/wgrest/v1
RUN curl -L https://github.com/suquant/wgrest-webapp/releases/latest/download/webapp.tar.gz -o webapp.tar.gz
RUN tar -xzvf webapp.tar.gz -C /var/lib/wgrest/
# Make the server start script executable
RUN chmod +x ./start_server.sh
# Set environment variable for the host
ENV HOST=0.0.0.0
ENV PORT=7860
# Expose a port for the server
EXPOSE ${PORT}
# Run the server start script
CMD ["/bin/sh", "./start_server.sh"] |