Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +6 -4
Dockerfile
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
|
|
| 1 |
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.10-slim
|
| 2 |
|
| 3 |
# install git
|
| 4 |
RUN apt-get update && apt-get install -y git
|
| 5 |
|
|
|
|
|
|
|
| 6 |
# need to force reinstall because of dependeincies
|
| 7 |
RUN pip install --no-cache-dir --upgrade pip && \
|
| 8 |
pip install --no-cache-dir fastapi uvicorn && \
|
| 9 |
-
pip install --no-cache-dir --upgrade --force-reinstall opentrons
|
| 10 |
-
pip install --no-cache-dir --force-reinstall opentrons-hardware@git+https://github.com/Opentrons/opentrons@
|
| 11 |
-
|
| 12 |
pip list
|
| 13 |
|
| 14 |
RUN useradd -m -u 1000 user
|
|
@@ -24,4 +26,4 @@ RUN chown -R user:user /app/storage
|
|
| 24 |
USER user
|
| 25 |
|
| 26 |
COPY --chmod=765 ./app /app
|
| 27 |
-
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 1 |
+
# Use a base image with Python 3.10 or higher
|
| 2 |
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.10-slim
|
| 3 |
|
| 4 |
# install git
|
| 5 |
RUN apt-get update && apt-get install -y git
|
| 6 |
|
| 7 |
+
|
| 8 |
+
|
| 9 |
# need to force reinstall because of dependeincies
|
| 10 |
RUN pip install --no-cache-dir --upgrade pip && \
|
| 11 |
pip install --no-cache-dir fastapi uvicorn && \
|
| 12 |
+
pip install --no-cache-dir --upgrade --force-reinstall opentrons && \
|
| 13 |
+
pip install --no-cache-dir --force-reinstall opentrons-hardware@git+https://github.com/Opentrons/opentrons@release#subdirectory=hardware && \
|
|
|
|
| 14 |
pip list
|
| 15 |
|
| 16 |
RUN useradd -m -u 1000 user
|
|
|
|
| 26 |
USER user
|
| 27 |
|
| 28 |
COPY --chmod=765 ./app /app
|
| 29 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|