gpt4free/Dockerfile

31 lines
649 B
Docker
Raw Normal View History

2023-05-02 18:24:48 +00: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 18:24:48 +00:00
RUN mkdir -p /usr/app
RUN python -m venv ./venv
COPY requirements.txt .
2023-05-02 18:24:48 +00: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 07:09:10 +00:00
FROM python:3.11
2023-05-02 18:24:48 +00: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 18:24:48 +00:00
EXPOSE 8501