d22cs051's picture
demo fixed docker file
756e779
FROM python:3.8.18
WORKDIR /code
# COPY ./requirements.txt /code/requirements.txt
# RUN pip install --upgrade pip
# RUN pip install --no-cache-dir fairseq
# RUN pip install --require-hashes --no-cache-dir -r /code/requirements.txt
# RUN pip install --no-cache-dir gradio
# RUN apt-get update
# RUN apt-get install sox wget -y
# RUN pip install --no-cache-dir sox tensorboard
# RUN python3 -m pip install setuptools==59.5.0
# RUN pip3 install speechbrain resampy sed_eval more-itertools
# RUN pip install --no-cache-dir "s3prl[all]"
# RUN pip install hydra hydra-core --no-deps --no-cache-dir
# RUN pip install ffprobe
# RUN git clone https://github.com/s3prl/s3prl
# WORKDIR /code/s3prl
# RUN python3 setup.py install
# # Set up a new user named "user" with user ID 1000
# python version 3.8
# torch wheel file install kardo
RUN wget https://download.pytorch.org/whl/cu111/torch-1.9.0%2Bcu111-cp38-cp38-linux_x86_64.whl
RUN pip install torch-1.9.0+cu111-cp38-cp38-linux_x86_64.whl
RUN pip install PyYAML==5.4.1
RUN pip install sklearn==0.0
RUN pip install fire==0.4.0
RUN pip install scipy==1.7.1
RUN pip install fairseq
RUN pip install s3prl
RUN pip install omegaconf==2.0.6
RUN pip install sentencepiece==0.1.96
RUN pip install gradio
RUN pip install soundfile
RUN useradd -m -u 1000 user
# Switch to the "user" user
USER user
# Set home to the user's home directory
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
# Set the working directory to the user's home directory
WORKDIR $HOME/app
# RUN mkdir -p /home/user/.cache/torch/hub
# RUN wget https://github.com/s3prl/s3prl/archive/master.zip -O /home/user/.cache/torch/hub/master.zip
# RUN unzip /home/user/.cache/torch/hub/master.zip -d /home/user/.cache/torch/hub/
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
COPY --chown=user . $HOME/app
CMD ["python3", "app.py"]