Jaman commited on
Commit
2a704e2
·
verified ·
1 Parent(s): 8f5ef36

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -8
Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- # Use an official Anaconda runtime as a parent image
2
  FROM continuumio/miniconda3
3
 
4
  # Set the working directory in the container
@@ -7,14 +7,12 @@ WORKDIR /app
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.1.4 pretty_midi librosa matchering pedalboard scipy
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"]
 
1
+ # Use the official Miniconda3 image
2
  FROM continuumio/miniconda3
3
 
4
  # Set the working directory in the container
 
7
  # Copy the current directory contents into the container at /app
8
  ADD . /app
9
 
10
+ # Create a new environment and install dependencies
11
+ RUN conda create -n myenv python=3.10 numpy=1.18.5 flask=2.0.2 && \
12
+ /opt/conda/envs/myenv/bin/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
 
 
13
 
14
  # Expose the port Flask is running on
15
  EXPOSE 5000
16
 
17
+ # Run app.py in the conda environment
18
+ CMD ["/opt/conda/envs/myenv/bin/python", "app.py"]