docker improvements
This commit is contained in:
25
Dockerfile
25
Dockerfile
@@ -1,24 +1,13 @@
|
||||
FROM python:latest AS build-image
|
||||
|
||||
RUN apt update && apt install -y libblas-dev liblapack-dev
|
||||
FROM python:latest
|
||||
RUN apt update && apt install -y bash
|
||||
|
||||
RUN python -m pip install --upgrade pip
|
||||
|
||||
RUN python -m venv /root/venv
|
||||
ENV PATH="/root/venv/bin:$PATH"
|
||||
|
||||
COPY ./requirements.txt ./requirements.txt
|
||||
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip pip install -r ./requirements.txt
|
||||
|
||||
|
||||
FROM python:slim
|
||||
|
||||
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 --mount=type=cache,mode=0755,target=/root/.cache/pip python -m pip install -r ./requirements.txt
|
||||
|
||||
RUN python -m nltk.downloader words punkt averaged_perceptron_tagger
|
||||
|
||||
WORKDIR /usr/app
|
||||
CMD [ "python", "./src/main.py" ]
|
||||
RUN mkdir /kwaylon
|
||||
COPY ./src /kwaylon
|
||||
WORKDIR /kwaylon
|
||||
# CMD [ "python", "main.py" ]
|
||||
|
||||
Reference in New Issue
Block a user