-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #183 --------- Co-authored-by: Yu-Hang Maxin Tang <[email protected]>
- Loading branch information
1 parent
6a477a7
commit b179392
Showing
3 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
minimum_shm_size=1048576 # ~1GB in KBs | ||
|
||
# Grab the second line / second field of the output of `df`, | ||
# which is the size of shm in KBs. | ||
actual_shm_size=$(df /dev/shm | awk 'NR==2 {print $2}') | ||
|
||
if (( actual_shm_size < minimum_shm_size )); then | ||
YELLOW='\033[0;33m' | ||
NOCOLOR='\033[0m' | ||
|
||
echo -e "${YELLOW} | ||
WARNING: Your shm is currenly less than 1GB. This may cause SIGBUS errors. | ||
To avoid this problem, you can manually set the shm size in docker with: | ||
$ docker run ... --shm-size=1g ... | ||
${NOCOLOR}" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,4 +52,3 @@ RUN <<EOF | |
pip install -e '/opt/rosetta[test,lint]' | ||
rm -rf ~/.cache/pip/ | ||
EOF | ||
|