Original Issue
I'm unable to install azure-cognitiveservices-speech within a docker container using pip. My container is running fine and is able to install all other packages (django, google-cloud-translate, boto3 for example) without any issues using the following dockerfile.
Original DockerFile
FROM python:3.8.2
ENV PYTHONUNBUFFERED=1
WORKDIR /code
COPY requirements.txt /code/
COPY . /code/
RUN pip install --no-cache-dir -r requirements.txt
COPY entrypoint.sh /code/entrypoint.sh
RUN chmod u+x /code/entrypoint.sh
Original requirements.txt
amqp==5.0.2
asgiref==3.3.1
billiard==3.6.3.0
celery==5.0.4
click==7.1.2
click-didyoumean==0.0.3
click-plugins==1.1.1
click-repl==0.1.6
dj-database-url==0.5.0
Django==3.1.3
django-crispy-forms==1.9.2
django-filter==2.4.0
django-rest-auth==0.9.5
djangorestframework==3.12.2
kombu==5.0.2
Markdown==3.3.3
prompt-toolkit==3.0.8
psycopg2==2.8.6
pytz==2020.4
six==1.15.0
sqlparse==0.4.1
vine==5.0.0
wcwidth==0.2.5
google-cloud-translate==3.0.2
django-storages==1.9.1
gunicorn==20.0.4
boto3==1.16.43
However, when azure-cognitiveservices-speech is added to this list, I am receiving the following error:
Original error
ERROR: Could not find a version that satisfies the requirement azure-cognitiveservices-speech (from versions: none)
ERROR: No matching distribution found for azure-cognitiveservices-speech
I have tried specifying the specific version of the module too.
Attempted Solutions
I have simplified the dockerfile and specified running on Ubuntu alongside installing some dependencies that I have read from other resources (https://github.com/Azure-Samples/cognitive-services-speech-sdk/issues/747) may be required for the azure-cognitiveservices-speech package, however to no avail.
Adjusted DockerFile
FROM ubuntu:18.04
RUN mkdir /code
WORKDIR /code
RUN apt-get update && apt-get install -y \
build-essential \
libssl1.0.0 \
libasound2 \
python3.7
RUN apt-get install -y python3-pip
ADD requirements.txt /code/
RUN pip3 install --upgrade pip
RUN pip3 install azure-cognitiveservices-speech
ADD . /code/
I have also tried multiple versions of Python within both versions of the docker container. However, I am still receiving the original error seen above.
Following this answer (Can't pip microsoft azure-cognitiveservices-speech?) I have run the original container and entered the terminal confirmed that I am running a suitable 64 bit version of python.
# python -c "import struct; print(struct.calcsize('P') * 8)"
64
Does anyone have a solution/appropriate enviroment to run this package within a container? Apologies for the long question, I have tried a whole host of things to get this package installed. Am I missing something fundamental?
Alternatively, is there another way to access this API without installing this package?
Additional info
I am running this container on a M1 macbook pro, however I have attempted it on an older intel mac to see if this may be the problem and I am still seeing the same error.