-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.dev
35 lines (30 loc) · 1.01 KB
/
Dockerfile.dev
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FROM python:3.10-alpine
WORKDIR /app
# set environment variables
ENV LANG=C.UTF-8 \
LC_ALL=C.UTF-8 \
PATH="${PATH}:/root/.poetry/bin" \
PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PYTHONPATH=/app/phrase_api \
PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
TZ=Asia/Tehran
# install dependencies
# build-essential python3-dev
# RUN apt update && apt upgrade -y && apt install curl python3-opencv ffmpeg libsm6 libxext6 -y
# python3-dev
RUN apk add curl gcc musl-dev libffi-dev make automake g++ python3-dev
# POETRY
RUN curl -sSL https://install.python-poetry.org | POETRY_HOME=/opt/poetry python && \
cd /usr/local/bin && \
ln -s /opt/poetry/bin/poetry && \
poetry config virtualenvs.create false
# RUN poetry lock -n && poetry export --without-hashes > requirements.txt
COPY pyproject.toml /app
COPY poetry.lock /app
RUN poetry install -n --no-dev
COPY . /app
# Final
WORKDIR /app
CMD uvicorn upscale_wrapper.main:app --host 0.0.0.0 --port 80 --reload --log-level ${LOG_LEVEL}