diff --git a/Dockerfile b/Dockerfile index f45fb23b..f1b6c2ef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,7 +15,9 @@ RUN pip3 install --upgrade pip setuptools RUN rm -rf /var/lib/apt/lists/* # Python is Python3. -RUN ln -s /usr/bin/python3 /usr/bin/python +ENV VIRTUAL_ENV=/edx/app/registrar/venvs/registrar +RUN python3.8 -m venv $VIRTUAL_ENV +ENV PATH="$VIRTUAL_ENV/bin:$PATH" # Use UTF-8. RUN locale-gen en_US.UTF-8 @@ -39,8 +41,8 @@ WORKDIR /edx/app/registrar # Copy just Python requirements & install them. COPY requirements/ /edx/app/registrar/requirements/ -COPY Makefile /edx/app/registrar/ -RUN make production-requirements +RUN pip install -r requirements/pip.txt +RUN pip install -r requirements/production.txt USER app diff --git a/Makefile b/Makefile index 2dab4116..41450b5e 100644 --- a/Makefile +++ b/Makefile @@ -85,6 +85,7 @@ upgrade: piptools $(COMMON_CONSTRAINTS_TXT) ## re-compile requirements .txt fi mv requirements/test.tmp requirements/test.txt piptools: + pip install -r requirements/pip.txt pip install -r requirements/pip-tools.txt requirements: devstack-requirements ## alias to make devstack-requirements diff --git a/requirements/pip.txt b/requirements/pip.txt new file mode 100644 index 00000000..3360c60c --- /dev/null +++ b/requirements/pip.txt @@ -0,0 +1,2 @@ +pip==20.2.3 +setuptools==50.3.0