dsmueller commited on
Commit
f460fb4
1 Parent(s): a3df053

Minor edits for formatting

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -12
Dockerfile CHANGED
@@ -27,13 +27,11 @@ RUN mkdir -p $HOME/config
27
  # Install Poetry
28
  RUN pip3 install poetry==1.7.1
29
 
30
- # Copy poetry files
31
  RUN cp /app/pyproject.toml /app/poetry.lock* $HOME
32
  RUN chown user:user $HOME/pyproject.toml $HOME/poetry.lock*
33
- # COPY --chown=user /app/pyproject.toml /app/poetry.lock* $HOME
34
 
35
- # Disable virtual environments creation by Poetry
36
- # as the Docker container itself is an isolated environment
37
  RUN poetry config virtualenvs.in-project true
38
 
39
  # Set the name of the virtual environment
@@ -45,10 +43,7 @@ ENV PATH="$HOME/.venv/bin:$PATH"
45
  # Install dependencies using Poetry
46
  RUN poetry install --no-dev
47
 
48
- # Copy the rest of your application code
49
- # COPY --chown=user src $HOME/src
50
- # COPY --chown=user data $HOME/data
51
- # COPY --chown=user config $HOME/config
52
  RUN cp -R /app/src /app/data /app/config $HOME
53
  RUN chown -R user:user $HOME/src $HOME/data $HOME/config
54
 
@@ -58,16 +53,12 @@ EXPOSE 8501
58
  # The HEALTHCHECK instruction tells Docker how to test a container to check that it is still working. Your container needs to listen to Streamlit’s (default) port 8501:
59
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
60
 
61
- # COPY --chown=user app.py $HOME/src
62
-
63
  # Update working directory to be consistent with where Start.py is
64
  WORKDIR $HOME/src
65
 
66
  # An ENTRYPOINT allows you to configure a container that will run as an executable. Here, it also contains the entire streamlit run command for your app, so you don’t have to call it from the command line
67
  ENTRYPOINT ["streamlit", "run", "Home.py", "--server.port=8501", "--server.address=0.0.0.0"]
68
 
69
- # CMD ["python", "app.py"]
70
-
71
  # To run locally
72
  # docker build -t ams-chatbot .
73
  # docker run -p 8501:8501 ams-chatbot
 
27
  # Install Poetry
28
  RUN pip3 install poetry==1.7.1
29
 
30
+ # Copy poetry files from repo into home
31
  RUN cp /app/pyproject.toml /app/poetry.lock* $HOME
32
  RUN chown user:user $HOME/pyproject.toml $HOME/poetry.lock*
 
33
 
34
+ # Disable virtual environments creation by Poetry as the Docker container itself is an isolated environment
 
35
  RUN poetry config virtualenvs.in-project true
36
 
37
  # Set the name of the virtual environment
 
43
  # Install dependencies using Poetry
44
  RUN poetry install --no-dev
45
 
46
+ # Copy the rest of the repo into home
 
 
 
47
  RUN cp -R /app/src /app/data /app/config $HOME
48
  RUN chown -R user:user $HOME/src $HOME/data $HOME/config
49
 
 
53
  # The HEALTHCHECK instruction tells Docker how to test a container to check that it is still working. Your container needs to listen to Streamlit’s (default) port 8501:
54
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
55
 
 
 
56
  # Update working directory to be consistent with where Start.py is
57
  WORKDIR $HOME/src
58
 
59
  # An ENTRYPOINT allows you to configure a container that will run as an executable. Here, it also contains the entire streamlit run command for your app, so you don’t have to call it from the command line
60
  ENTRYPOINT ["streamlit", "run", "Home.py", "--server.port=8501", "--server.address=0.0.0.0"]
61
 
 
 
62
  # To run locally
63
  # docker build -t ams-chatbot .
64
  # docker run -p 8501:8501 ams-chatbot