Skip to content

Commit

Permalink
Merge pull request #251 from SkywardAI/feat/docker
Browse files Browse the repository at this point in the history
Add venv inside container, fix the warning of using root python
  • Loading branch information
Aisuko authored Jul 13, 2024
2 parents 6a45eb6 + ce28364 commit 10bd87a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 0 additions & 3 deletions .dockerignore

This file was deleted.

7 changes: 6 additions & 1 deletion backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ WORKDIR /app

ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ENV VIRTUAL_ENV=/opt/venv

# Switch on virtual environment
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

# Install system dependencies
# netcat for nc command
Expand All @@ -17,7 +22,7 @@ RUN apt-get update \

COPY . .

RUN pip --disable-pip-version-check --no-cache-dir install -r requirements.txt && rm -rf /tmp/pip-tmp
RUN pip3 --disable-pip-version-check --no-cache-dir install -r requirements.txt && rm -rf /tmp/pip-tmp

EXPOSE 8000

Expand Down

0 comments on commit 10bd87a

Please sign in to comment.