File size: 1,226 Bytes
6a5f0f7 3ea974d 4ca827d 3ea974d 4ca827d 6a5f0f7 4ca827d 6a5f0f7 |
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 31 32 33 34 35 36 37 38 39 |
# Use an official Python runtime as a parent image
FROM python:3.9-slim
# Set the working directory to /app
WORKDIR /app
# Install system dependencies including curl
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
# Install necessary tools
RUN apt-get update && \
apt-get install -y curl build-essential && \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Ensure Cargo is in the PATH
ENV PATH="/root/.cargo/bin:${PATH}"
# Download the model files from Zenodo
#RUN curl -o classification_model.ckpt -L https://zenodo.org/record/11116990/files/classification_model.ckpt
#RUN curl -o segmentation_model.pt -L https://zenodo.org/record/11116990/files/segmentation_model.pt
# Copy the current directory contents into the container at /app
COPY . /app
# Install any needed packages specified in requirements.txt
RUN pip install -r /app/requirements.txt && \
pip uninstall opencv-python -y && \
pip install opencv-contrib-python-headless==4.5.5.64
# Make port 8080 available to the world outside this container
EXPOSE 8080
# Run app.py when the container launches
CMD ["python", "app.py"]
|