File size: 1,196 Bytes
4631d6a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# 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"]