Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Docker for Vivado
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ISC
Docker for Vivado
Commits
db29a24a
Commit
db29a24a
authored
2 months ago
by
joachim.schmidt
Browse files
Options
Downloads
Patches
Plain Diff
The Dockerfile has been added
parent
86324759
Branches
main
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docker/vitis-vivado/Dockerfile
+46
-0
46 additions, 0 deletions
docker/vitis-vivado/Dockerfile
docker/vitis-vivado/installLibs.sh
+127
-0
127 additions, 0 deletions
docker/vitis-vivado/installLibs.sh
with
173 additions
and
0 deletions
docker/vitis-vivado/Dockerfile
0 → 100644
+
46
−
0
View file @
db29a24a
# Use Ubuntu 22.04 as the base image
FROM
ubuntu:22.04
# Set environment variables to ensure non-interactive installs
ENV
DEBIAN_FRONTEND=noninteractive
# Update package lists and install necessary packages
RUN
apt-get update
&&
apt-get
install
-y
\
wget
\
curl
\
unzip
\
build-essential
\
locales
\
usbutils
\
vim
\
emacs
\
libudev1
\
libudev-dev
\
&&
rm
-rf
/var/lib/apt/lists/
*
# Generate the en_US.UTF-8 locale
RUN
locale-gen en_US.UTF-8
# Set the locale environment variables
ENV
LANG=en_US.UTF-8 \
LC_ALL=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8
# Set LD_PRELOAD to automatically load the required libudev.so.1
ENV
LD_PRELOAD=/lib/x86_64-linux-gnu/libudev.so.1
# Create the required directory (if needed) and copy your script or other necessary files
# Assuming the installLibs.sh script is available in the build context
COPY
./installLibs.sh /installLibs.sh
# Make sure the script is executable
RUN
chmod
+x /installLibs.sh
# Run the installation script during the build process
RUN
/installLibs.sh
ENV
XILINXD_LICENSE_FILE="2100@10.136.142.218"
ENV
LM_LICENSE_FILE="2100@10.136.142.218"
# Make the script run automatically when the container starts
ENTRYPOINT
["/bin/bash", "-c", "source /tools/Xilinx/Vivado/2024.2/settings64.sh && exec bash"]
\ No newline at end of file
This diff is collapsed.
Click to expand it.
docker/vitis-vivado/installLibs.sh
0 → 100755
+
127
−
0
View file @
db29a24a
#!/bin/bash
#############################################################
# Copyright (c) 1986-2019 Xilinx, Inc. All rights reserved. #
#############################################################
if
[
"
$EUID
"
-ne
0
]
;
then
echo
"This script must be run as root"
exit
1
fi
user
=
`
who
am i |
awk
'{print $1}'
`
if
[
"foo
${
user
}
"
==
"foo"
]
;
then
tmp
=
`
tty
`
user
=
`
ls
-l
${
tmp
}
|
awk
'{print $3}'
`
fi
tstamp
=
$(
date
'+%Y-%m-%d_%H-%M-%S'
)
scriptName
=
`
basename
"
$0
"
`
logFile
=
$PWD
/
${
scriptName
}
_
${
tstamp
}
touch
$logFile
;
chmod
777
$logFile
root
=
$(
readlink
-f
$(
dirname
${
BASH_SOURCE
[0]
}
))
############################### Check OS version requirement ###################
# use lsb_release to get the OS info, if lsb_release is not installed then #
# try to extract the os inof from /etc/os-release #
################################################################################
test
=
$(
lsb_release
>
/dev/null
;
echo
$?
)
if
[
$test
==
0
]
;
then
OSDIST
=
`
lsb_release
-i
|awk
-F
:
'{print tolower($2)}'
|
tr
-d
' \t'
`
OSREL
=
`
lsb_release
-r
|awk
-F
:
'{print tolower($2)}'
|tr
-d
' \t'
|
awk
-F
.
'{print $1}'
`
elif
[
-f
/etc/os-release
]
;
then
echo
"No lsb_release found, extracting info from: /etc/os-release "
>>
$logFile
echo
"No lsb_release found, trying to extract OS info from: /etc/os-release"
OSDIST
=
$(
awk
-F
=
'$1=="ID" { print $2 ;}'
/etc/os-release
)
OSDIST
=
$(
echo
"
$OSDIST
"
|
tr
-d
'"'
)
OSREL
=
$(
awk
-F
=
'$1=="VERSION_ID" { print $2 ;}'
/etc/os-release
)
OSREL
=
$(
echo
"
$OSREL
"
|
tr
-d
'"'
)
else
echo
"I could not detect the OS and version. Please install lsb and run this script again."
echo
"To install lsb_release on Ubuntu run: 'sudo apt-get install -y lsb"
echo
"To install lsb_release on CentOS/REHL run: sudo yum install -y lsb"
echo
"Could not detect the OS and version. please install lsb_release and run this script again"
>>
$logFile
echo
"To install lsb_release on Ubuntu run: 'sudo apt-get install -y lsb"
>>
$logFile
echo
"To install lsb_release on CentOS/REHL run: sudo yum install -y lsb"
>>
$logFile
exit
1
fi
echo
"
$OSDIST
-
$OSREL
install"
echo
"
$OSDIST
-
$OSREL
install"
>>
$logFile
doUbuntu
()
{
### AIE Tools prerequisite libraries
apt-get update |
tee
-a
$logFile
apt-get
install
-y
libc6-dev-i386 net-tools |
tee
-a
$logFile
apt-get
install
-y
graphviz |
tee
-a
$logFile
apt-get
install
-y
make |
tee
-a
$logFile
### Vitis Tools prerequisite libraries
apt-get
install
-y
unzip |
tee
-a
$logFile
apt-get
install
-y
zip |
tee
-a
$logFile
apt-get
install
-y
g++ |
tee
-a
$logFile
apt-get
install
-y
libtinfo5 |
tee
-a
$logFile
apt-get
install
-y
xvfb |
tee
-a
$logFile
apt-get
install
-y
git |
tee
-a
$logFile
apt-get
install
-y
libncursesw5 |
tee
-a
$logFile
apt-get
install
-y
libc6-dev-i386 |
tee
-a
$logFile
apt-get
install
-y
libnss3-dev |
tee
-a
$logFile
apt-get
install
-y
libgdk-pixbuf2.0-dev |
tee
-a
$logFile
apt-get
install
-y
libgtk-3-dev |
tee
-a
$logFile
apt-get
install
-y
libxss-dev |
tee
-a
$logFile
apt-get
install
-y
libasound2 |
tee
-a
$logFile
apt-get
install
-y
compat-openssl10 |
tee
-a
$logFile
apt-get
install
-y
fdisk |
tee
-a
$logFile
}
doCentOs_RHEL_common
()
{
### AIE Tools prerequisite libraries
yum
install
-y
graphviz |
tee
-a
$logFile
yum
install
-y
redhat-lsb |
tee
-a
$logFile
yum
install
-y
openssl |
tee
-a
$logFile
yum
install
-y
libXScrnSaver |
tee
-a
$logFile
yum
install
-y
xorg-x11-utils |
tee
-a
$logFile
### Vitis Tools prerequisite libraries
yum
install
-y
gcc |
tee
-a
$logFile
yum
install
-y
gcc-c++ |
tee
-a
$logFile
yum
install
-y
git |
tee
-a
$logFile
### To install kernel headers and kernel development packages
yum
install
-y
kernel-headers-
`
uname
-r
`
|
tee
-a
$logFile
yum
install
-y
kernel-devel-
`
uname
-r
`
|
tee
-a
$logFile
yum
install
-y
Xvfb |
tee
-a
$logFile
}
doCentOs
()
{
yum
install
-y
epel-release |
tee
-a
$logFile
}
doRHELOs
()
{
LIBTINFO
=
$(
find
"/lib64/"
-type
f
-name
"libtinfo.so*"
)
ln
-s
$LIBTINFO
/lib64/libtinfo.so.5
}
if
[[
$OSDIST
==
"ubuntu"
]]
;
then
doUbuntu
fi
if
[[
$OSDIST
==
"centos"
]]
;
then
doCentOs_RHEL_common
doCentOs
fi
if
[[
$OSDIST
==
"redhat"
*
]]
;
then
doCentOs_RHEL_common
fi
if
[[
$OSDIST
==
"rhel"
*
]]
;
then
doCentOs_RHEL_common
doRHELOs
fi
if
[[
$OSDIST
==
"almalinux"
*
]]
;
then
doCentOs_RHEL_common
doRHELOs
fi
echo
"INFO: For more information please check
$logFile
log."
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment