dockerize app
This commit is contained in:
25
Dockerfile
Normal file
25
Dockerfile
Normal file
@ -0,0 +1,25 @@
|
||||
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 .
|
Reference in New Issue
Block a user