Spaces:
Sleeping
Sleeping
File size: 878 Bytes
e9eedaa 027c301 62a70e4 815cb5c 67612db 815cb5c e9eedaa 62a70e4 e9eedaa b6f7f31 62a70e4 a2b1de7 cd2e3bb a2b1de7 cd2e3bb 5588936 e9eedaa |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# Use a base image with Python 3.10 or higher
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.10-slim
# install git
RUN apt-get update && apt-get install -y git
# need to force reinstall because of dependeincies
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir fastapi uvicorn && \
pip install --no-cache-dir --upgrade --force-reinstall opentrons && \
pip install --no-cache-dir --force-reinstall opentrons-hardware@git+https://github.com/Opentrons/opentrons@release#subdirectory=hardware && \
pip list
RUN useradd -m -u 1000 user
USER root
# Create the 'storage' directory with root permissions
RUN mkdir /app/storage
# Change ownership of the 'storage' directory to the 'user' user
RUN chown -R user:user /app/storage
USER user
COPY --chmod=765 ./app /app
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|