gpt4free/Dockerfile

31 lines
649 B
Docker
Raw Normal View History

2023-05-02 14:24:48 -04:00
FROM python:3.11 as builder
WORKDIR /usr/app
ENV PATH="/usr/app/venv/bin:$PATH"
RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg && rm -rf /var/lib/apt/lists/*
2023-05-02 14:24:48 -04:00
RUN mkdir -p /usr/app
RUN python -m venv ./venv
COPY requirements.txt .
2023-05-02 14:24:48 -04:00
RUN pip install -r requirements.txt
# RUN pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
# RUN pip config set global.trusted-host mirrors.aliyun.com
2023-05-04 03:09:10 -04:00
FROM python:3.11
2023-05-02 14:24:48 -04:00
WORKDIR /usr/app
ENV PATH="/usr/app/venv/bin:$PATH"
COPY --from=builder /usr/app/venv ./venv
COPY . .
RUN cp ./gui/streamlit_app.py .
CMD ["streamlit", "run", "streamlit_app.py"]
2023-05-02 14:24:48 -04:00
EXPOSE 8501