-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathDockerfile
34 lines (26 loc) · 866 Bytes
/
Dockerfile
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
# Use an official Python runtime as a parent image
FROM python:3.9.18-slim
# Set environment varibles
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# Install system dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends gcc python3-dev
# Install poetry
RUN pip install "poetry==1.5.1"
# Set the working directory in the Docker image
WORKDIR /app
# Copy only requirements to cache them in docker layer
COPY pyproject.toml poetry.lock ./
COPY src/genai /app/src/genai
COPY README.md /app/README.md
COPY app.py /app/app.py
# Don't push the image to dockerhub
COPY .env /app/.env
COPY .streamlit /app/.streamlit
# Project initialization:
RUN poetry config virtualenvs.create false \
&& poetry install --no-interaction --no-ansi
EXPOSE 8501
# Specify the command to run your application
CMD ["streamlit", "run", "app.py"]