forked from Significant-Gravitas/AutoGPT-Code-Ability
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.frontend
37 lines (26 loc) · 880 Bytes
/
Dockerfile.frontend
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
36
37
# Use an official Python runtime as a parent image
FROM python:3.11-slim as frontend
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# Set work directory in the container
WORKDIR /app
# Install Poetry
ENV POETRY_VERSION=1.1.8 \
POETRY_HOME="/opt/poetry" \
POETRY_NO_INTERACTION=1 \
POETRY_VIRTUALENVS_CREATE=false \
PATH="$POETRY_HOME/bin:$PATH"
RUN pip3 install --no-cache-dir python-dotenv poetry
COPY pyproject.toml poetry.lock* /app/
RUN mkdir /app/frontend
RUN touch /app/frontend/__init__.py
RUN touch /app/README.md
# Install dependencies
RUN poetry install --no-interaction --no-ansi
# Copy the rest of the application code
COPY frontend/ /app
# Expose the application port
EXPOSE 8501
# Command to run the application
ENTRYPOINT ["streamlit", "run", "chat.py", "--server.port=8501", "--server.address=0.0.0.0"]