25 lines
622 B
Docker
25 lines
622 B
Docker
FROM python:3.13-slim
|
|
|
|
# Set timezone
|
|
ARG WTH
|
|
ENV WTH=$WTH
|
|
ENV TZ="Asia/Taipei"
|
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
|
|
|
# Init workspace
|
|
RUN mkdir -p /app
|
|
WORKDIR /app
|
|
|
|
# Install dependencies
|
|
# Poetry exportation cmd: poetry export --without-hashes --without dev -f requirements.txt -o requirements.tx
|
|
COPY ./requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy source copy
|
|
COPY ./translator .
|
|
|
|
# Run app
|
|
CMD streamlit run app.py --server.port=8501 --server.enableCORS=false --server.enableXsrfProtection=false
|
|
|
|
# Build
|
|
# docker build -t translator:latest . |