mirror of
https://github.com/EpicMorg/docker-scripts.git
synced 2024-12-26 06:35:40 +03:00
freegpt pre-release
This commit is contained in:
parent
10353c9730
commit
3329a73fae
@ -1,28 +1,60 @@
|
|||||||
|
##################################################################
|
||||||
|
##################################################################
|
||||||
|
##################################################################
|
||||||
|
# Build stage
|
||||||
|
##################################################################
|
||||||
|
##################################################################
|
||||||
|
##################################################################
|
||||||
FROM epicmorg/python:3.10-develop AS build
|
FROM epicmorg/python:3.10-develop AS build
|
||||||
|
|
||||||
WORKDIR /app
|
ENV FREEGPT_PATH=/app
|
||||||
|
ENV FREEGPT_PORT=1338
|
||||||
RUN git clone https://github.com/Em1tSan/freegpt-webui-ru.git /app && \
|
ENV FREEGTP_PY_BIN=/root/.local/bin
|
||||||
rm -rfv /app/.git
|
|
||||||
|
|
||||||
RUN apt-get update && \
|
|
||||||
apt-get install -y --no-install-recommends build-essential libffi-dev cmake libcurl4-openssl-dev && \
|
|
||||||
pip3 install --user --no-cache-dir -r /app/requirements-docker.txt
|
|
||||||
|
|
||||||
# Production stage
|
|
||||||
FROM epicmorg/python:3.10 AS production
|
|
||||||
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
COPY --from=build /root/.local /root/.local
|
|
||||||
|
|
||||||
COPY --from=build /app /app
|
|
||||||
|
|
||||||
#RUN git clone https://github.com/Em1tSan/freegpt-webui-ru.git /app && \
|
|
||||||
# rm -rfv /app/.git
|
|
||||||
|
|
||||||
ENV PATH=/root/.local/bin:$PATH
|
ENV PATH=/root/.local/bin:$PATH
|
||||||
|
|
||||||
EXPOSE 1338
|
RUN git clone https://github.com/Em1tSan/freegpt-webui-ru.git ${FREEGPT_PATH} && \
|
||||||
|
rm -rfv ${FREEGPT_PATH}/.git
|
||||||
|
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
|
build-essential \
|
||||||
|
libffi-dev cmake \
|
||||||
|
libcurl4-openssl-dev && \
|
||||||
|
pip3 install --user --no-cache-dir -r ${FREEGPT_PATH}/requirements-docker.txt
|
||||||
|
|
||||||
|
##################################################################
|
||||||
|
##################################################################
|
||||||
|
##################################################################
|
||||||
|
# Production stage
|
||||||
|
##################################################################
|
||||||
|
##################################################################
|
||||||
|
##################################################################
|
||||||
|
FROM epicmorg/python:3.10 AS production
|
||||||
|
|
||||||
|
ENV FREEGPT_PATH=/app
|
||||||
|
ENV FREEGPT_PORT=1338
|
||||||
|
ENV FREEGTP_PY_BIN=/root/.local/bin
|
||||||
|
ENV PATH=/root/.local/bin:$PATH
|
||||||
|
|
||||||
|
RUN mkdir -p ${FREEGTP_PY_BIN} ${FREEGPT_PATH}
|
||||||
|
|
||||||
|
##################################################################
|
||||||
|
# Copy bins
|
||||||
|
##################################################################
|
||||||
|
COPY --from=build /root/.local /root/.local
|
||||||
|
COPY --from=build /app /app
|
||||||
|
|
||||||
|
##################################################################
|
||||||
|
# cleaninig up
|
||||||
|
##################################################################
|
||||||
|
RUN apt clean -y && \
|
||||||
|
apt-get clean all && \
|
||||||
|
apt autoclean -y && \
|
||||||
|
rm -rfv /var/lib/apt/lists/* && \
|
||||||
|
rm -rfv /var/cache/apt/archives/*.deb && \
|
||||||
|
rm -rfv /tmp/*
|
||||||
|
|
||||||
|
WORKDIR ${FREEGPT_PATH}
|
||||||
|
EXPOSE ${FREEGPT_PORT}
|
||||||
|
|
||||||
CMD ["python3", "./run.py"]
|
CMD ["python3", "./run.py"]
|
||||||
|
Loading…
Reference in New Issue
Block a user