|
|
|
FROM python:3.11-slim |
|
|
|
|
|
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 |
|
|
|
|
|
|
|
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/ |
|
|
|
|
|
RUN chmod +x ./start_server.sh |
|
|
|
|
|
ENV HOST=0.0.0.0 |
|
ENV PORT=7860 |
|
|
|
|
|
EXPOSE ${PORT} |
|
|
|
|
|
CMD ["/bin/sh", "./start_server.sh"] |