Skip to content

Commit

Permalink
Try to fix missing directories errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanjli committed Jan 17, 2024
1 parent 5fc03fb commit a6aaaa8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions processing/segmenter/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,28 @@ RUN \

# Drop some privileges by running as non-root user
RUN useradd --create-home pi
WORKDIR /home/pi/device-backend/processing/segmenter
USER pi

# Generate architecture-specific requirements.txt file to install with pip.
# We install dependencies using pip rather than poetry because poetry tries to build numpy 1.22.4 on
# armv7 instead of downloading from piwheels. Also, this way we don't need to have poetry in the
# final image.
WORKDIR /home/pi/poetry
COPY pyproject.toml poetry.lock .
RUN \
PATH="$HOME/.local/bin:$PATH" pip install --no-cache-dir --extra-index-url https://www.piwheels.org/simple pip==23.3.2 && \
python -m venv ./poetry && \
./poetry/bin/pip install --no-cache-dir --extra-index-url https://www.piwheels.org/simple poetry==1.7.1 poetry-plugin-export==1.6.0 && \
./poetry/bin/poetry export -f requirements.txt -o /tmp/requirements.txt && \
python -m venv . && \
./bin/pip install --no-cache-dir --extra-index-url https://www.piwheels.org/simple poetry==1.7.1 poetry-plugin-export==1.6.0 && \
./bin/poetry export -f requirements.txt -o /tmp/requirements.txt && \
pip freeze > ./pip-installed.txt && \
pip uninstall -y -r ./pip-installed.txt && \
rm -rf ./poetry && \
rm ./pyproject.toml ./poetry.lock ./pip-installed.txt
rm -rf /home/pi/poetry

# Install Python dependencies
RUN \
pip install --no-cache-dir --extra-index-url https://www.piwheels.org/simple -r /tmp/requirements.txt

# Set up application
WORKDIR /home/pi/device-backend/processing/segmenter
COPY planktoscope/ main.py .
ENTRYPOINT ["python", "main.py"]

0 comments on commit a6aaaa8

Please sign in to comment.