Update Dockerfile
Browse files- Dockerfile +8 -18
Dockerfile
CHANGED
|
@@ -1,30 +1,20 @@
|
|
| 1 |
-
# Use an official
|
| 2 |
-
FROM
|
| 3 |
|
| 4 |
# Set the working directory in the container
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
# Install necessary system dependencies
|
| 8 |
-
RUN apt-get update && apt-get install -y \
|
| 9 |
-
build-essential \
|
| 10 |
-
python3-dev \
|
| 11 |
-
python3-distutils \
|
| 12 |
-
libopenblas-dev \
|
| 13 |
-
libatlas-base-dev \
|
| 14 |
-
gfortran \
|
| 15 |
-
&& apt-get clean
|
| 16 |
-
|
| 17 |
# Copy the current directory contents into the container at /app
|
| 18 |
ADD . /app
|
| 19 |
|
| 20 |
-
#
|
| 21 |
-
RUN
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
|
| 26 |
# Expose the port Flask is running on
|
| 27 |
EXPOSE 5000
|
| 28 |
|
| 29 |
# Run app.py when the container launches
|
| 30 |
-
CMD ["python", "app.py"]
|
|
|
|
| 1 |
+
# Use an official Anaconda runtime as a parent image
|
| 2 |
+
FROM continuumio/miniconda3
|
| 3 |
|
| 4 |
# Set the working directory in the container
|
| 5 |
WORKDIR /app
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
# Copy the current directory contents into the container at /app
|
| 8 |
ADD . /app
|
| 9 |
|
| 10 |
+
# Create a new environment with required dependencies
|
| 11 |
+
RUN conda create -n myenv python=3.10 \
|
| 12 |
+
&& conda activate myenv \
|
| 13 |
+
&& conda install -y numpy==1.18.5 flask==2.0.2 \
|
| 14 |
+
&& pip install spleeter==2.1.0 autochord==0.0.1 pretty_midi==0.2.9 librosa==0.8.1 matchering==2.0.1 pedalboard==0.4.0 scipy==1.7.1
|
| 15 |
|
| 16 |
# Expose the port Flask is running on
|
| 17 |
EXPOSE 5000
|
| 18 |
|
| 19 |
# Run app.py when the container launches
|
| 20 |
+
CMD ["conda", "run", "--no-capture-output", "-n", "myenv", "python", "app.py"]
|