dsmueller commited on
Commit
72d8122
1 Parent(s): b75e6f3

Add virtual environment configuration to Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -0
Dockerfile CHANGED
@@ -29,9 +29,15 @@ COPY --chown=user pyproject.toml poetry.lock ./
29
  # as the Docker container itself is an isolated environment
30
  RUN poetry config virtualenvs.in-project true
31
 
 
 
 
32
  # Install dependencies
33
  RUN poetry install
34
 
 
 
 
35
  # Copy the current directory contents into the container
36
  COPY --chown=user . $HOME/app
37
 
 
29
  # as the Docker container itself is an isolated environment
30
  RUN poetry config virtualenvs.in-project true
31
 
32
+ # Set the name of the virtual environment
33
+ RUN poetry config virtualenvs.path $HOME/app/.venv
34
+
35
  # Install dependencies
36
  RUN poetry install
37
 
38
+ # Set the .venv folder as the virtual environment directory
39
+ ENV PATH="$HOME/app/.venv/bin:$PATH"
40
+
41
  # Copy the current directory contents into the container
42
  COPY --chown=user . $HOME/app
43