# Use an official Python runtime as a parent image FROM python:3.7-slim RUN apt-get update && \ apt-get install -y tar && \ apt-get install -y libxml2 && \ ln -s /bin/tar /usr/bin/tar # Set the working directory to /app RUN mkdir /app WORKDIR /app # Copy the current directory contents into the container at /app COPY . /app # Make install directory RUN mkdir -p /python-fbx/install RUN chmod -R ugo+w /python-fbx # Unzip FBX SDK RUN tar -vxzf fbx202032_fbxpythonsdk_linux.tar.gz -C /python-fbx RUN chmod ugo+x /python-fbx/fbx202032_fbxpythonsdk_linux RUN printf "yes\nn" | /python-fbx/fbx202032_fbxpythonsdk_linux /python-fbx/install # Install FBX SDK RUN cp /python-fbx/install/lib/Python37_x64/* /usr/local/lib/python3.7/site-packages/ # Set fbx file permissions RUN chmod 755 /usr/local/lib/python3.7/site-packages/fbx.so # Install any needed packages specified in requirements.txt RUN pip install --trusted-host pypi.python.org -r requirements.txt # Make port 7860 available to the world outside this container EXPOSE 7860 # Define environment variable ENV NAME World # Run app.py when the container launches CMD ["streamlit", "run", "app.py", "--server.port", "7860"]