Update dockerfiles
This commit is contained in:
parent
5bd7e58ed8
commit
824fd42982
3 changed files with 9 additions and 25 deletions
6
.dockerignore
Normal file
6
.dockerignore
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
.venv
|
||||||
|
.env
|
||||||
|
**/.cache
|
||||||
|
.git
|
||||||
|
**/__pycache__
|
||||||
|
.dockerignore
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
FROM python:3.10.4-alpine3.16
|
FROM python:3.10.4-slim-bullseye
|
||||||
|
|
||||||
ENV ENVIRONMENT production
|
ENV ENVIRONMENT production
|
||||||
|
|
||||||
|
|
@ -14,8 +14,8 @@ RUN pip install --no-cache-dir en-core-web-sm@https://github.com/explosion/spacy
|
||||||
COPY great_ai great_ai
|
COPY great_ai great_ai
|
||||||
RUN pip install --no-cache-dir ./great_ai
|
RUN pip install --no-cache-dir ./great_ai
|
||||||
|
|
||||||
COPY requirements.txt ./
|
# COPY requirements.txt ./
|
||||||
RUN pip install --no-cache-dir --requirement requirements.txt
|
# RUN pip install --no-cache-dir --requirement requirements.txt
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN rm -rf great_ai
|
RUN rm -rf great_ai
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
FROM python:3.10.4-slim-bullseye
|
|
||||||
|
|
||||||
ENV ENVIRONMENT development
|
|
||||||
|
|
||||||
VOLUME /app
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
RUN apt-get update &&\
|
|
||||||
apt-get install build-essential -y &&\
|
|
||||||
rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
RUN python3 -m pip install --no-cache-dir --upgrade pip &&\
|
|
||||||
python3 -m pip install --no-cache-dir en-core-web-sm@https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.3.0/en_core_web_sm-3.3.0-py3-none-any.whl
|
|
||||||
|
|
||||||
COPY requirements.txt ./
|
|
||||||
RUN python3 -m pip install --no-cache-dir -r requirements.txt
|
|
||||||
|
|
||||||
EXPOSE 5000
|
|
||||||
|
|
||||||
VOLUME /dependencies
|
|
||||||
|
|
||||||
CMD ["/bin/bash", "-c", "python3 -m pip install -e /dependencies/sus && python3 -m uvicorn --reload --host 0.0.0.0 --port 5000 main:app"]
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue