optimized kwalyon's container building
This commit is contained in:
26
Dockerfile
26
Dockerfile
@@ -1,16 +1,24 @@
|
||||
FROM python:latest
|
||||
FROM python:latest AS build-image
|
||||
|
||||
RUN apt update && apt install -y libblas-dev liblapack-dev
|
||||
|
||||
RUN python -m pip install --upgrade pip
|
||||
|
||||
RUN pip install pandas
|
||||
RUN pip install nltk
|
||||
RUN python -m nltk.downloader -d /usr/local/share/nltk_data all
|
||||
RUN pip install python-dotenv
|
||||
RUN python -m venv /root/venv
|
||||
ENV PATH="/root/venv/bin:$PATH"
|
||||
|
||||
RUN pip install nextcord
|
||||
COPY ./requirements.txt ./requirements.txt
|
||||
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip pip install -r ./requirements.txt
|
||||
|
||||
RUN pip install beautifulsoup4 requests lxml
|
||||
|
||||
WORKDIR /usr/app/src
|
||||
FROM python:slim
|
||||
|
||||
CMD [ "python", "main.py" ]
|
||||
RUN apt update && apt install -y libblas-dev liblapack-dev
|
||||
|
||||
COPY --from=build-image /root/venv /root/venv
|
||||
ENV PATH="/root/venv/bin:$PATH"
|
||||
|
||||
RUN python -m nltk.downloader words
|
||||
|
||||
WORKDIR /usr/app
|
||||
CMD [ "python", "./src/main.py" ]
|
||||
|
||||
Reference in New Issue
Block a user