Skip to content

Commit

Permalink
Clean up of Eggnet/Software directory
Browse files Browse the repository at this point in the history
  • Loading branch information
tqml committed Jun 20, 2020
1 parent 86ee6e4 commit 2c44dca
Show file tree
Hide file tree
Showing 1,053 changed files with 180 additions and 258,672 deletions.
41 changes: 41 additions & 0 deletions vivado/Software/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.122.1/containers/cpp
{
"name": "Linux ARM",
"dockerFile": "../Dockerfile",
"runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined"],


// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-vscode.cpptools",
"austin.code-gnu-global",
"xaver.clang-format",
"llvm-vs-code-extensions.vscode-clangd",
"twxs.cmake",
"ms-vscode.cmake-tools",
"cschlosser.doxdocgen",
"ms-python.python",
"njpwerner.autodocstring"
],



"mounts": [ "source=${localWorkspaceFolder},target=/eggnet/driver,type=bind" ],
"workspaceFolder": "/eggnet/driver"

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "gcc -v",

// Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root.
// "remoteUser": "vscode"

}
78 changes: 53 additions & 25 deletions vivado/Software/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,30 +52,42 @@ RUN apt-get install -y --no-install-recommends \
&& apt-get autoremove && apt-get autoclean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

ADD pysetup/requirements.txt /
ADD pysetup/python-versions.txt /

# Add Files
ADD EggDriver/pysetup/requirements.txt /EggDriver/pysetup/requirements.txt
ADD EggDriver/pysetup/python-versions.txt /EggDriver/pysetup/python-versions.txt
ADD EggDriver/pysetup/info.py /EggDriver/pysetup/info.py
RUN ls /EggDriver/pysetup

# The CC, CXX flags and so on must be removed to compile python
RUN unset CC && unset CXX && unset CPP && unset LD && unset AR && unset AS
ENV CC=gcc \
CPP=cpp \
CXX=g++ \
LD=ld \
AR=ar \
AS=as
# RUN unset CC && unset CXX && unset CPP && unset LD && unset AR && unset AS
# ENV CC=gcc \
# CPP=cpp \
# CXX=g++ \
# LD=ld \
# AR=ar \
# AS=as


# Create the pyenv versions
RUN git clone https://github.com/pyenv/pyenv.git $PYENV_ROOT \
&& for version in `cat /python-versions.txt`; do pyenv install $version; done \
&& pyenv global `cat /python-versions.txt`
#&& find $PYENV_ROOT/versions -type d '(' -name '__pycache__' -o -name 'test' -o -name 'tests' ')' -exec rm -rf '{}' + \
#&& find $PYENV_ROOT/versions -type f '(' -name '*.pyo' -o -name '*.exe' ')' -exec rm -f '{}' + \
#&& rm -rf /tmp/*
RUN git clone https://github.com/pyenv/pyenv.git $PYENV_ROOT
RUN for version in `cat /EggDriver/pysetup/python-versions.txt`; do echo $version; pyenv install $version; done
RUN pyenv global `cat /EggDriver/pysetup/python-versions.txt`
RUN pyenv rehash
RUN rm -rf /tmp/*

# && find $PYENV_ROOT/versions -type d '(' -name '__pycache__' -o -name 'test' -o -name 'tests' ')' -exec rm -rf '{}' + \
# && find $PYENV_ROOT/versions -type f '(' -name '*.pyo' -o -name '*.exe' ')' -exec rm -f '{}' + \
# && rm -rf /tmp/*

# Install pip manually, should not be needed
# RUN wget https://bootstrap.pypa.io/get-pip.py
# RUN python get-pip.py
# RUN rm /get-pip.py



# Install all requirements
RUN pip install --no-cache-dir -r /requirements.txt \
RUN pip install --no-cache-dir -r /EggDriver/pysetup/requirements.txt \
&& find $PYENV_ROOT/versions -type d '(' -name '__pycache__' -o -name 'test' -o -name 'tests' ')' -exec rm -rf '{}' + \
&& find $PYENV_ROOT/versions -type f '(' -name '*.pyo' -o -name '*.exe' ')' -exec rm -f '{}' + \
&& rm -rf /tmp/*
Expand All @@ -91,11 +103,27 @@ RUN mkdir swig && \
sudo make install && \
make clean


# Install newest CMAKE
ENV cmversion=3.16
ENV cmbuild=8
RUN apt remove --purge --auto-remove cmake
RUN mkdir /cmake && cd /cmake
# Example

# wget https://cmake.org/files/v3.16/cmake-3.16.8-Linux-x86_64.tar.gz && mkdir /opt/cmake && cp /opt/cmake/ && tar -xf /cmake/*.tar.gz
RUN wget https://cmake.org/files/v$cmversion/cmake-$cmversion.$cmbuild-Linux-x86_64.tar.gz && tar -xf *.tar.gz
RUN mkdir /opt/cmake && cp /opt/cmake/
RUN ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake

# Test CMAKE
RUN cmake --version

# RESTORE ENVIRONMENT VARS
ENV AS=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-as \
AR=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-ar \
CC=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-gcc \
CPP=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-cpp \
CXX=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-g++ \
LD=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-ld \
FC=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-gfortran
# ENV AS=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-as \
# AR=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-ar \
# CC=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-gcc \
# CPP=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-cpp \
# CXX=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-g++ \
# LD=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-ld \
# FC=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-gfortran
Loading

0 comments on commit 2c44dca

Please sign in to comment.